"""Defines a struct representing a single card. The struct takes the form:(front, back)"""fromcollectionsimportnamedtuplefromhashlibimportmd5Card=namedtuple('Card',['front','back'])defgetId(card:Card)->int:returnint(md5((card.front+card.back).encode("utf-8")).hexdigest(),16)