@@ -0,0 +1,1158 @@
+NUM_GROUPS = 11%0AOBJ_PER_GROUP = 4%0A%0Aobjects = %7B%0A    (original_group, group_object_number)%0A    for original_group in range(NUM_GROUPS)%0A    for group_object_number in range(OBJ_PER_GROUP)%0A%7D%0A%0Aobjects_matched_with = %7B%0A    obj: set()%0A    for obj in objects%0A%7D%0A%0Aprint(len(objects), %22objects%22)%0Aprint(NUM_GROUPS, %22groups%22)%0Aprint(OBJ_PER_GROUP, %22objects per group%22)%0A%0Atotal_grouping_rounds = 0%0Awhile True:%0A    grouping_round = %7B%0A        x: set() for x in range(NUM_GROUPS)%0A    %7D%0A%0A    for obj in objects:%0A        grouping_round%5B(obj%5B0%5D + (obj%5B1%5D * total_grouping_rounds)) %25 NUM_GROUPS%5D.add(obj)%0A%0A    print(%22Round%22, total_grouping_rounds+1, %22: %22, grouping_round)%0A%0A    for group_number, group in grouping_round.items():%0A        assert len(group) == OBJ_PER_GROUP%0A        for obj in group:%0A            for other_obj in group:%0A                if obj != other_obj:%0A                    if other_obj in objects_matched_with%5Bobj%5D:%0A                        print(obj, %22has already matched with%22, other_obj, %22total grouping rounds:%22, total_grouping_rounds)%0A                        exit(0)%0A                    objects_matched_with%5Bobj%5D.add(other_obj)%0A%0A    total_grouping_rounds += 1%0A

Create sgp.py