CoCalc Public Filesonelinersandcycles.sagews
Author: Sarah Wolff
Views : 8

n=7
P=Permutations(n, avoiding=[2,3,1])
#P.list()
Q=[]
for i in [0..len(P)-1]:
Q.append(P[i].to_cycles())
#turn all the avoiding oneliners into their cycle notation
#print Q
notcycles=[]
cycles=[]
for i in [0..len(Q)-1]:
if len(Q[i])==1:
cycles.append(Q[i])
else:
notcycles.append(Q[i])
print cycles
#print notcycles
print len(cycles)
#print len(notcycles)

print Q

[[(1, 3), (2,), (4,), (5,), (6,), (7,), (8,), (9,)], [(1, 3, 2), (4,), (5,), (6,), (7,), (8,), (9,)], [(1,), (2, 3), (4,), (5,), (6,), (7,), (8,), (9,)], [(1, 2), (3,), (4,), (5,), (6,), (7,), (8,), (9,)], [(1,), (2,), (3,), (4,), (5,), (6,), (7,), (8,), (9,)], [(1, 2), (3, 4), (5,), (6,), (7,), (8,), (9,)], [(1,), (2,), (3, 4), (5,), (6,), (7,), (8,), (9,)], [(1,), (2, 4), (3,), (5,), (6,), (7,), (8,), (9,)], [(1,), (2, 4, 3), (5,), (6,), (7,), (8,), (9,)], [(1, 4), (2, 3), (5,), (6,), (7,), (8,), (9,)], [(1, 4, 2, 3), (5,), (6,), (7,), (8,), (9,)], [(1, 4, 2), (3,), (5,), (6,), (7,), (8,), (9,)], [(1, 4, 3), (2,), (5,), (6,), (7,), (8,), (9,)], [(1, 4, 3, 2), (5,), (6,), (7,), (8,), (9,)], [(1, 3), (2,), (4, 5), (6,), (7,), (8,), (9,)], [(1, 3, 2), (4, 5), (6,), (7,), (8,), (9,)], [(1,), (2, 3), (4, 5), (6,), (7,), (8,), (9,)], [(1, 2), (3,), (4, 5), (6,), (7,), (8,), (9,)], [(1,), (2,), (3,), (4, 5), (6,), (7,), (8,), (9,)], [(1, 2), (3, 5), (4,), (6,), (7,), (8,), (9,)], [(1,), (2,), (3, 5), (4,), (6,), (7,), (8,), (9,)], [(1, 2), (3, 5, 4), (6,), (7,), (8,), (9,)], [(1,), (2,), (3, 5, 4), (6,), (7,), (8,), (9,)], [(1,), (2, 5), (3, 4), (6,), (7,), (8,), (9,)], [(1,), (2, 5, 3, 4), (6,), (7,), (8,), (9,)], [(1,), (2, 5, 3), (4,), (6,), (7,), (8,), (9,)], [(1,), (2, 5, 4), (3,), (6,), (7,), (8,), (9,)], [(1,), (2, 5, 4, 3), (6,), (7,), (8,), (9,)], [(1, 5, 4), (2, 3), (6,), (7,), (8,), (9,)], [(1, 5, 4, 2, 3), (6,), (7,), (8,), (9,)], [(1, 5, 4, 2), (3,), (6,), (7,), (8,), (9,)], [(1, 5, 4, 3), (2,), (6,), (7,), (8,), (9,)], [(1, 5, 4, 3, 2), (6,), (7,), (8,), (9,)], [(1, 5, 3), (2,), (4,), (6,), (7,), (8,), (9,)], [(1, 5, 3, 2), (4,), (6,), (7,), (8,), (9,)], [(1, 5, 2), (3, 4), (6,), (7,), (8,), (9,)], [(1, 5, 3, 4, 2), (6,), (7,), (8,), (9,)], [(1, 5), (2, 4), (3,), (6,), (7,), (8,), (9,)], [(1, 5, 2, 4), (3,), (6,), (7,), (8,), (9,)], [(1, 5, 2, 4, 3), (6,), (7,), (8,), (9,)], [(1, 5, 3, 2, 4), (6,), (7,), (8,), (9,)], [(1, 5, 3), (2, 4), (6,), (7,), (8,), (9,)], [(1, 3), (2,), (4,), (5, 6), (7,), (8,), (9,)], [(1, 3, 2), (4,), (5, 6), (7,), (8,), (9,)], [(1,), (2, 3), (4,), (5, 6), (7,), (8,), (9,)], [(1, 2), (3,), (4,), (5, 6), (7,), (8,), (9,)], [(1,), (2,), (3,), (4,), (5, 6), (7,), (8,), (9,)], [(1, 2), (3, 4), (5, 6), (7,), (8,), (9,)], [(1,), (2,), (3, 4), (5, 6), (7,), (8,), (9,)], [(1,), (2, 4), (3,), (5, 6), (7,), (8,), (9,)], [(1,), (2, 4, 3), (5, 6), (7,), (8,), (9,)], [(1, 4), (2, 3), (5, 6), (7,), (8,), (9,)], [(1, 4, 2, 3), (5, 6), (7,), (8,), (9,)], [(1, 4, 2), (3,), (5, 6), (7,), (8,), (9,)], [(1, 4, 3), (2,), (5, 6), (7,), (8,), (9,)], [(1, 4, 3, 2), (5, 6), (7,), (8,), (9,)], [(1, 3), (2,), (4, 6), (5,), (7,), (8,), (9,)], [(1, 3, 2), (4, 6), (5,), (7,), (8,), (9,)], [(1,), (2, 3), (4, 6), (5,), (7,), (8,), (9,)], [(1, 2), (3,), (4, 6), (5,), (7,), (8,), (9,)], [(1,), (2,), (3,), (4, 6), (5,), (7,), (8,), (9,)], [(1, 3), (2,), (4, 6, 5), (7,), (8,), (9,)], [(1, 3, 2), (4, 6, 5), (7,), (8,), (9,)], [(1,), (2, 3), (4, 6, 5), (7,), (8,), (9,)], [(1, 2), (3,), (4, 6, 5), (7,), (8,), (9,)], [(1,), (2,), (3,), (4, 6, 5), (7,), (8,), (9,)], [(1, 2), (3, 6), (4, 5), (7,), (8,), (9,)], [(1,), (2,), (3, 6), (4, 5), (7,), (8,), (9,)], [(1, 2), (3, 6, 4, 5), (7,), (8,), (9,)], [(1,), (2,), (3, 6, 4, 5), (7,), (8,), (9,)], [(1, 2), (3, 6, 4), (5,), (7,), (8,), (9,)], [(1,), (2,), (3, 6, 4), (5,), (7,), (8,), (9,)], [(1, 2), (3, 6, 5), (4,), (7,), (8,), (9,)], [(1,), (2,), (3, 6, 5), (4,), (7,), (8,), (9,)], [(1, 2), (3, 6, 5, 4), (7,), (8,), (9,)], [(1,), (2,), (3, 6, 5, 4), (7,), (8,), (9,)], [(1,), (2, 6, 5), (3, 4), (7,), (8,), (9,)], [(1,), (2, 6, 5, 3, 4), (7,), (8,), (9,)], [(1,), (2, 6, 5, 3), (4,), (7,), (8,), (9,)], [(1,), (2, 6, 5, 4), (3,), (7,), (8,), (9,)], [(1,), (2, 6, 5, 4, 3), (7,), (8,), (9,)], [(1,), (2, 6, 4), (3,), (5,), (7,), (8,), (9,)], [(1,), (2, 6, 4, 3), (5,), (7,), (8,), (9,)], [(1,), (2, 6, 3), (4, 5), (7,), (8,), (9,)], [(1,), (2, 6, 4, 5, 3), (7,), (8,), (9,)], [(1,), (2, 6), (3, 5), (4,), (7,), (8,), (9,)], [(1,), (2, 6, 3, 5), (4,), (7,), (8,), (9,)], [(1,), (2, 6, 3, 5, 4), (7,), (8,), (9,)], [(1,), (2, 6, 4, 3, 5), (7,), (8,), (9,)], [(1,), (2, 6, 4), (3, 5), (7,), (8,), (9,)], [(1, 6, 5, 4), (2, 3), (7,), (8,), (9,)], [(1, 6, 5, 4, 2, 3), (7,), (8,), (9,)], [(1, 6, 5, 4, 2), (3,), (7,), (8,), (9,)], [(1, 6, 5, 4, 3), (2,), (7,), (8,), (9,)], [(1, 6, 5, 4, 3, 2), (7,), (8,), (9,)], [(1, 6, 5, 3), (2,), (4,), (7,), (8,), (9,)], [(1, 6, 5, 3, 2), (4,), (7,), (8,), (9,)], [(1, 6, 5, 2), (3, 4), (7,), (8,), (9,)], [(1, 6, 5, 3, 4, 2), (7,), (8,), (9,)], [(1, 6, 5), (2, 4), (3,), (7,), (8,), (9,)], [(1, 6, 5, 2, 4), (3,), (7,), (8,), (9,)], [(1, 6, 5, 2, 4, 3), (7,), (8,), (9,)], [(1, 6, 5, 3, 2, 4), (7,), (8,), (9,)], [(1, 6, 5, 3), (2, 4), (7,), (8,), (9,)], [(1, 6, 4), (2, 3), (5,), (7,), (8,), (9,)], [(1, 6, 4, 2, 3), (5,), (7,), (8,), (9,)], [(1, 6, 4, 2), (3,), (5,), (7,), (8,), (9,)], [(1, 6, 4, 3), (2,), (5,), (7,), (8,), (9,)], [(1, 6, 4, 3, 2), (5,), (7,), (8,), (9,)], [(1, 6, 3), (2,), (4, 5), (7,), (8,), (9,)], [(1, 6, 3, 2), (4, 5), (7,), (8,), (9,)], [(1, 6, 4, 5, 3), (2,), (7,), (8,), (9,)], [(1, 6, 4, 5, 3, 2), (7,), (8,), (9,)], [(1, 6, 2), (3, 5), (4,), (7,), (8,), (9,)], [(1, 6, 3, 5, 2), (4,), (7,), (8,), (9,)], [(1, 6, 3, 5, 4, 2), (7,), (8,), (9,)], [(1, 6, 4, 3, 5, 2), (7,), (8,), (9,)], [(1, 6, 4, 2), (3, 5), (7,), (8,), (9,)], [(1, 6, 4, 2, 5), (3,), (7,), (8,), (9,)], [(1, 6, 4), (2, 5), (3,), (7,), (8,), (9,)], [(1, 6, 4, 3), (2, 5), (7,), (8,), (9,)], [(1, 6, 4), (2, 5, 3), (7,), (8,), (9,)], [(1, 6, 4, 2, 5, 3), (7,), (8,), (9,)], [(1, 6, 3, 2, 5, 4), (7,), (8,), (9,)], [(1, 6, 3), (2, 5, 4), (7,), (8,), (9,)], [(1, 6, 2, 5, 3), (4,), (7,), (8,), (9,)], [(1, 6, 3), (2, 5), (4,), (7,), (8,), (9,)], [(1, 6), (2, 5), (3, 4), (7,), (8,), (9,)], [(1, 6, 2, 5), (3, 4), (7,), (8,), (9,)], [(1, 6, 2, 5, 3, 4), (7,), (8,), (9,)], [(1, 6, 3, 4, 2, 5), (7,), (8,), (9,)], [(1, 6, 3, 4), (2, 5), (7,), (8,), (9,)], [(1, 3), (2,), (4,), (5,), (6, 7), (8,), (9,)], [(1, 3, 2), (4,), (5,), (6, 7), (8,), (9,)], [(1,), (2, 3), (4,), (5,), (6, 7), (8,), (9,)], [(1, 2), (3,), (4,), (5,), (6, 7), (8,), (9,)], [(1,), (2,), (3,), (4,), (5,), (6, 7), (8,), (9,)], [(1, 2), (3, 4), (5,), (6, 7), (8,), (9,)], [(1,), (2,), (3, 4), (5,), (6, 7), (8,), (9,)], [(1,), (2, 4), (3,), (5,), (6, 7), (8,), (9,)], [(1,), (2, 4, 3), (5,), (6, 7), (8,), (9,)], [(1, 4), (2, 3), (5,), (6, 7), (8,), (9,)], [(1, 4, 2, 3), (5,), (6, 7), (8,), (9,)], [(1, 4, 2), (3,), (5,), (6, 7), (8,), (9,)], [(1, 4, 3), (2,), (5,), (6, 7), (8,), (9,)], [(1, 4, 3, 2), (5,), (6, 7), (8,), (9,)], [(1, 3), (2,), (4, 5), (6, 7), (8,), (9,)], [(1, 3, 2), (4, 5), (6, 7), (8,), (9,)], [(1,), (2, 3), (4, 5), (6, 7), (8,), (9,)], [(1, 2), (3,), (4, 5), (6, 7), (8,), (9,)], [(1,), (2,), (3,), (4, 5), (6, 7), (8,), (9,)], [(1, 2), (3, 5), (4,), (6, 7), (8,), (9,)], [(1,), (2,), (3, 5), (4,), (6, 7), (8,), (9,)], [(1, 2), (3, 5, 4), (6, 7), (8,), (9,)], [(1,), (2,), (3, 5, 4), (6, 7), (8,), (9,)], [(1,), (2, 5), (3, 4), (6, 7), (8,), (9,)], [(1,), (2, 5, 3, 4), (6, 7), (8,), (9,)], [(1,), (2, 5, 3), (4,), (6, 7), (8,), (9,)], [(1,), (2, 5, 4), (3,), (6, 7), (8,), (9,)], [(1,), (2, 5, 4, 3), (6, 7), (8,), (9,)], [(1, 5, 4), (2, 3), (6, 7), (8,), (9,)], [(1, 5, 4, 2, 3), (6, 7), (8,), (9,)], [(1, 5, 4, 2), (3,), (6, 7), (8,), (9,)], [(1, 5, 4, 3), (2,), (6, 7), (8,), (9,)], [(1, 5, 4, 3, 2), (6, 7), (8,), (9,)], [(1, 5, 3), (2,), (4,), (6, 7), (8,), (9,)], [(1, 5, 3, 2), (4,), (6, 7), (8,), (9,)], [(1, 5, 2), (3, 4), (6, 7), (8,), (9,)], [(1, 5, 3, 4, 2), (6, 7), (8,), (9,)], [(1, 5), (2, 4), (3,), (6, 7), (8,), (9,)], [(1, 5, 2, 4), (3,), (6, 7), (8,), (9,)], [(1, 5, 2, 4, 3), (6, 7), (8,), (9,)], [(1, 5, 3, 2, 4), (6, 7), (8,), (9,)], [(1, 5, 3), (2, 4), (6, 7), (8,), (9,)], [(1, 3), (2,), (4,), (5, 7), (6,), (8,), (9,)], [(1, 3, 2), (4,), (5, 7), (6,), (8,), (9,)], [(1,), (2, 3), (4,), (5, 7), (6,), (8,), (9,)], [(1, 2), (3,), (4,), (5, 7), (6,), (8,), (9,)], [(1,), (2,), (3,), (4,), (5, 7), (6,), (8,), (9,)], [(1, 2), (3, 4), (5, 7), (6,), (8,), (9,)], [(1,), (2,), (3, 4), (5, 7), (6,), (8,), (9,)], [(1,), (2, 4), (3,), (5, 7), (6,), (8,), (9,)], [(1,), (2, 4, 3), (5, 7), (6,), (8,), (9,)], [(1, 4), (2, 3), (5, 7), (6,), (8,), (9,)], [(1, 4, 2, 3), (5, 7), (6,), (8,), (9,)], [(1, 4, 2), (3,), (5, 7), (6,), (8,), (9,)], [(1, 4, 3), (2,), (5, 7), (6,), (8,), (9,)], [(1, 4, 3, 2), (5, 7), (6,), (8,), (9,)], [(1, 3), (2,), (4,), (5, 7, 6), (8,), (9,)], [(1, 3, 2), (4,), (5, 7, 6), (8,), (9,)], [(1,), (2, 3), (4,), (5, 7, 6), (8,), (9,)], [(1, 2), (3,), (4,), (5, 7, 6), (8,), (9,)], [(1,), (2,), (3,), (4,), (5, 7, 6), (8,), (9,)], [(1, 2), (3, 4), (5, 7, 6), (8,), (9,)], [(1,), (2,), (3, 4), (5, 7, 6), (8,), (9,)], [(1,), (2, 4), (3,), (5, 7, 6), (8,), (9,)], [(1,), (2, 4, 3), (5, 7, 6), (8,), (9,)], [(1, 4), (2, 3), (5, 7, 6), (8,), (9,)], [(1, 4, 2, 3), (5, 7, 6), (8,), (9,)], [(1, 4, 2), (3,), (5, 7, 6), (8,), (9,)], [(1, 4, 3), (2,), (5, 7, 6), (8,), (9,)], [(1, 4, 3, 2), (5, 7, 6), (8,), (9,)], [(1, 3), (2,), (4, 7), (5, 6), (8,), (9,)], [(1, 3, 2), (4, 7), (5, 6), (8,), (9,)], [(1,), (2, 3), (4, 7), (5, 6), (8,), (9,)], [(1, 2), (3,), (4, 7), (5, 6), (8,), (9,)], [(1,), (2,), (3,), (4, 7), (5, 6), (8,), (9,)], [(1, 3), (2,), (4, 7, 5, 6), (8,), (9,)], [(1, 3, 2), (4, 7, 5, 6), (8,), (9,)], [(1,), (2, 3), (4, 7, 5, 6), (8,), (9,)], [(1, 2), (3,), (4, 7, 5, 6), (8,), (9,)], [(1,), (2,), (3,), (4, 7, 5, 6), (8,), (9,)], [(1, 3), (2,), (4, 7, 5), (6,), (8,), (9,)], [(1, 3, 2), (4, 7, 5), (6,), (8,), (9,)], [(1,), (2, 3), (4, 7, 5), (6,), (8,), (9,)], [(1, 2), (3,), (4, 7, 5), (6,), (8,), (9,)], [(1,), (2,), (3,), (4, 7, 5), (6,), (8,), (9,)], [(1, 3), (2,), (4, 7, 6), (5,), (8,), (9,)], [(1, 3, 2), (4, 7, 6), (5,), (8,), (9,)], [(1,), (2, 3), (4, 7, 6), (5,), (8,), (9,)], [(1, 2), (3,), (4, 7, 6), (5,), (8,), (9,)], [(1,), (2,), (3,), (4, 7, 6), (5,), (8,), (9,)], [(1, 3), (2,), (4, 7, 6, 5), (8,), (9,)], [(1, 3, 2), (4, 7, 6, 5), (8,), (9,)], [(1,), (2, 3), (4, 7, 6, 5), (8,), (9,)], [(1, 2), (3,), (4, 7, 6, 5), (8,), (9,)], [(1,), (2,), (3,), (4, 7, 6, 5), (8,), (9,)], [(1, 2), (3, 7, 6), (4, 5), (8,), (9,)], [(1,), (2,), (3, 7, 6), (4, 5), (8,), (9,)], [(1, 2), (3, 7, 6, 4, 5), (8,), (9,)], [(1,), (2,), (3, 7, 6, 4, 5), (8,), (9,)], [(1, 2), (3, 7, 6, 4), (5,), (8,), (9,)], [(1,), (2,), (3, 7, 6, 4), (5,), (8,), (9,)], [(1, 2), (3, 7, 6, 5), (4,), (8,), (9,)], [(1,), (2,), (3, 7, 6, 5), (4,), (8,), (9,)], [(1, 2), (3, 7, 6, 5, 4), (8,), (9,)], [(1,), (2,), (3, 7, 6, 5, 4), (8,), (9,)], [(1, 2), (3, 7, 5), (4,), (6,), (8,), (9,)], [(1,), (2,), (3, 7, 5), (4,), (6,), (8,), (9,)], [(1, 2), (3, 7, 5, 4), (6,), (8,), (9,)], [(1,), (2,), (3, 7, 5, 4), (6,), (8,), (9,)], [(1, 2), (3, 7, 4), (5, 6), (8,), (9,)], [(1,), (2,), (3, 7, 4), (5, 6), (8,), (9,)], [(1, 2), (3, 7, 5, 6, 4), (8,), (9,)], [(1,), (2,), (3, 7, 5, 6, 4), (8,), (9,)], [(1, 2), (3, 7), (4, 6), (5,), (8,), (9,)], [(1,), (2,), (3, 7), (4, 6), (5,), (8,), (9,)], [(1, 2), (3, 7, 4, 6), (5,), (8,), (9,)], [(1,), (2,), (3, 7, 4, 6), (5,), (8,), (9,)], [(1, 2), (3, 7, 4, 6, 5), (8,), (9,)], [(1,), (2,), (3, 7, 4, 6, 5), (8,), (9,)], [(1, 2), (3, 7, 5, 4, 6), (8,), (9,)], [(1,), (2,), (3, 7, 5, 4, 6), (8,), (9,)], [(1, 2), (3, 7, 5), (4, 6), (8,), (9,)], [(1,), (2,), (3, 7, 5), (4, 6), (8,), (9,)], [(1,), (2, 7, 6, 5), (3, 4), (8,), (9,)], [(1,), (2, 7, 6, 5, 3, 4), (8,), (9,)], [(1,), (2, 7, 6, 5, 3), (4,), (8,), (9,)], [(1,), (2, 7, 6, 5, 4), (3,), (8,), (9,)], [(1,), (2, 7, 6, 5, 4, 3), (8,), (9,)], [(1,), (2, 7, 6, 4), (3,), (5,), (8,), (9,)], [(1,), (2, 7, 6, 4, 3), (5,), (8,), (9,)], [(1,), (2, 7, 6, 3), (4, 5), (8,), (9,)], [(1,), (2, 7, 6, 4, 5, 3), (8,), (9,)], [(1,), (2, 7, 6), (3, 5), (4,), (8,), (9,)], [(1,), (2, 7, 6, 3, 5), (4,), (8,), (9,)], [(1,), (2, 7, 6, 3, 5, 4), (8,), (9,)], [(1,), (2, 7, 6, 4, 3, 5), (8,), (9,)], [(1,), (2, 7, 6, 4), (3, 5), (8,), (9,)], [(1,), (2, 7, 5), (3, 4), (6,), (8,), (9,)], [(1,), (2, 7, 5, 3, 4), (6,), (8,), (9,)], [(1,), (2, 7, 5, 3), (4,), (6,), (8,), (9,)], [(1,), (2, 7, 5, 4), (3,), (6,), (8,), (9,)], [(1,), (2, 7, 5, 4, 3), (6,), (8,), (9,)], [(1,), (2, 7, 4), (3,), (5, 6), (8,), (9,)], [(1,), (2, 7, 4, 3), (5, 6), (8,), (9,)], [(1,), (2, 7, 5, 6, 4), (3,), (8,), (9,)], [(1,), (2, 7, 5, 6, 4, 3), (8,), (9,)], [(1,), (2, 7, 3), (4, 6), (5,), (8,), (9,)], [(1,), (2, 7, 4, 6, 3), (5,), (8,), (9,)], [(1,), (2, 7, 4, 6, 5, 3), (8,), (9,)], [(1,), (2, 7, 5, 4, 6, 3), (8,), (9,)], [(1,), (2, 7, 5, 3), (4, 6), (8,), (9,)], [(1,), (2, 7, 5, 3, 6), (4,), (8,), (9,)], [(1,), (2, 7, 5), (3, 6), (4,), (8,), (9,)], [(1,), (2, 7, 5, 4), (3, 6), (8,), (9,)], [(1,), (2, 7, 5), (3, 6, 4), (8,), (9,)], [(1,), (2, 7, 5, 3, 6, 4), (8,), (9,)], [(1,), (2, 7, 4, 3, 6, 5), (8,), (9,)], [(1,), (2, 7, 4), (3, 6, 5), (8,), (9,)], [(1,), (2, 7, 3, 6, 4), (5,), (8,), (9,)], [(1,), (2, 7, 4), (3, 6), (5,), (8,), (9,)], [(1,), (2, 7), (3, 6), (4, 5), (8,), (9,)], [(1,), (2, 7, 3, 6), (4, 5), (8,), (9,)], [(1,), (2, 7, 3, 6, 4, 5), (8,), (9,)], [(1,), (2, 7, 4, 5, 3, 6), (8,), (9,)], [(1,), (2, 7, 4, 5), (3, 6), (8,), (9,)], [(1, 7, 6, 5, 4), (2, 3), (8,), (9,)], [(1, 7, 6, 5, 4, 2, 3), (8,), (9,)], [(1, 7, 6, 5, 4, 2), (3,), (8,), (9,)], [(1, 7, 6, 5, 4, 3), (2,), (8,), (9,)], [(1, 7, 6, 5, 4, 3, 2), (8,), (9,)], [(1, 7, 6, 5, 3), (2,), (4,), (8,), (9,)], [(1, 7, 6, 5, 3, 2), (4,), (8,), (9,)], [(1, 7, 6, 5, 2), (3, 4), (8,), (9,)], [(1, 7, 6, 5, 3, 4, 2), (8,), (9,)], [(1, 7, 6, 5), (2, 4), (3,), (8,), (9,)], [(1, 7, 6, 5, 2, 4), (3,), (8,), (9,)], [(1, 7, 6, 5, 2, 4, 3), (8,), (9,)], [(1, 7, 6, 5, 3, 2, 4), (8,), (9,)], [(1, 7, 6, 5, 3), (2, 4), (8,), (9,)], [(1, 7, 6, 4), (2, 3), (5,), (8,), (9,)], [(1, 7, 6, 4, 2, 3), (5,), (8,), (9,)], [(1, 7, 6, 4, 2), (3,), (5,), (8,), (9,)], [(1, 7, 6, 4, 3), (2,), (5,), (8,), (9,)], [(1, 7, 6, 4, 3, 2), (5,), (8,), (9,)], [(1, 7, 6, 3), (2,), (4, 5), (8,), (9,)], [(1, 7, 6, 3, 2), (4, 5), (8,), (9,)], [(1, 7, 6, 4, 5, 3), (2,), (8,), (9,)], [(1, 7, 6, 4, 5, 3, 2), (8,), (9,)], [(1, 7, 6, 2), (3, 5), (4,), (8,), (9,)], [(1, 7, 6, 3, 5, 2), (4,), (8,), (9,)], [(1, 7, 6, 3, 5, 4, 2), (8,), (9,)], [(1, 7, 6, 4, 3, 5, 2), (8,), (9,)], [(1, 7, 6, 4, 2), (3, 5), (8,), (9,)], [(1, 7, 6, 4, 2, 5), (3,), (8,), (9,)], [(1, 7, 6, 4), (2, 5), (3,), (8,), (9,)], [(1, 7, 6, 4, 3), (2, 5), (8,), (9,)], [(1, 7, 6, 4), (2, 5, 3), (8,), (9,)], [(1, 7, 6, 4, 2, 5, 3), (8,), (9,)], [(1, 7, 6, 3, 2, 5, 4), (8,), (9,)], [(1, 7, 6, 3), (2, 5, 4), (8,), (9,)], [(1, 7, 6, 2, 5, 3), (4,), (8,), (9,)], [(1, 7, 6, 3), (2, 5), (4,), (8,), (9,)], [(1, 7, 6), (2, 5), (3, 4), (8,), (9,)], [(1, 7, 6, 2, 5), (3, 4), (8,), (9,)], [(1, 7, 6, 2, 5, 3, 4), (8,), (9,)], [(1, 7, 6, 3, 4, 2, 5), (8,), (9,)], [(1, 7, 6, 3, 4), (2, 5), (8,), (9,)], [(1, 7, 5, 4), (2, 3), (6,), (8,), (9,)], [(1, 7, 5, 4, 2, 3), (6,), (8,), (9,)], [(1, 7, 5, 4, 2), (3,), (6,), (8,), (9,)], [(1, 7, 5, 4, 3), (2,), (6,), (8,), (9,)], [(1, 7, 5, 4, 3, 2), (6,), (8,), (9,)], [(1, 7, 5, 3), (2,), (4,), (6,), (8,), (9,)], [(1, 7, 5, 3, 2), (4,), (6,), (8,), (9,)], [(1, 7, 5, 2), (3, 4), (6,), (8,), (9,)], [(1, 7, 5, 3, 4, 2), (6,), (8,), (9,)], [(1, 7, 5), (2, 4), (3,), (6,), (8,), (9,)], [(1, 7, 5, 2, 4), (3,), (6,), (8,), (9,)], [(1, 7, 5, 2, 4, 3), (6,), (8,), (9,)], [(1, 7, 5, 3, 2, 4), (6,), (8,), (9,)], [(1, 7, 5, 3), (2, 4), (6,), (8,), (9,)], [(1, 7, 4), (2, 3), (5, 6), (8,), (9,)], [(1, 7, 4, 2, 3), (5, 6), (8,), (9,)], [(1, 7, 4, 2), (3,), (5, 6), (8,), (9,)], [(1, 7, 4, 3), (2,), (5, 6), (8,), (9,)], [(1, 7, 4, 3, 2), (5, 6), (8,), (9,)], [(1, 7, 5, 6, 4), (2, 3), (8,), (9,)], [(1, 7, 5, 6, 4, 2, 3), (8,), (9,)], [(1, 7, 5, 6, 4, 2), (3,), (8,), (9,)], [(1, 7, 5, 6, 4, 3), (2,), (8,), (9,)], [(1, 7, 5, 6, 4, 3, 2), (8,), (9,)], [(1, 7, 3), (2,), (4, 6), (5,), (8,), (9,)], [(1, 7, 3, 2), (4, 6), (5,), (8,), (9,)], [(1, 7, 4, 6, 3), (2,), (5,), (8,), (9,)], [(1, 7, 4, 6, 3, 2), (5,), (8,), (9,)], [(1, 7, 4, 6, 5, 3), (2,), (8,), (9,)], [(1, 7, 4, 6, 5, 3, 2), (8,), (9,)], [(1, 7, 5, 4, 6, 3), (2,), (8,), (9,)], [(1, 7, 5, 4, 6, 3, 2), (8,), (9,)], [(1, 7, 5, 3), (2,), (4, 6), (8,), (9,)], [(1, 7, 5, 3, 2), (4, 6), (8,), (9,)], [(1, 7, 5, 3, 6, 2), (4,), (8,), (9,)], [(1, 7, 5, 2), (3, 6), (4,), (8,), (9,)], [(1, 7, 5, 4, 2), (3, 6), (8,), (9,)], [(1, 7, 5, 2), (3, 6, 4), (8,), (9,)], [(1, 7, 5, 3, 6, 4, 2), (8,), (9,)], [(1, 7, 4, 3, 6, 5, 2), (8,), (9,)], [(1, 7, 4, 2), (3, 6, 5), (8,), (9,)], [(1, 7, 3, 6, 4, 2), (5,), (8,), (9,)], [(1, 7, 4, 2), (3, 6), (5,), (8,), (9,)], [(1, 7, 2), (3, 6), (4, 5), (8,), (9,)], [(1, 7, 3, 6, 2), (4, 5), (8,), (9,)], [(1, 7, 3, 6, 4, 5, 2), (8,), (9,)], [(1, 7, 4, 5, 3, 6, 2), (8,), (9,)], [(1, 7, 4, 5, 2), (3, 6), (8,), (9,)], [(1, 7, 5), (2, 6, 4), (3,), (8,), (9,)], [(1, 7, 5, 2, 6, 4), (3,), (8,), (9,)], [(1, 7, 5, 2, 6, 4, 3), (8,), (9,)], [(1, 7, 5, 3, 2, 6, 4), (8,), (9,)], [(1, 7, 5, 3), (2, 6, 4), (8,), (9,)], [(1, 7, 5, 4), (2, 6, 3), (8,), (9,)], [(1, 7, 5, 4, 2, 6, 3), (8,), (9,)], [(1, 7, 5, 3), (2, 6), (4,), (8,), (9,)], [(1, 7, 5, 2, 6, 3), (4,), (8,), (9,)], [(1, 7, 5, 2, 6), (3, 4), (8,), (9,)], [(1, 7, 5), (2, 6), (3, 4), (8,), (9,)], [(1, 7, 5, 3, 4), (2, 6), (8,), (9,)], [(1, 7, 5), (2, 6, 3, 4), (8,), (9,)], [(1, 7, 5, 2, 6, 3, 4), (8,), (9,)], [(1, 7, 4, 2, 6, 5), (3,), (8,), (9,)], [(1, 7, 4), (2, 6, 5), (3,), (8,), (9,)], [(1, 7, 4, 3), (2, 6, 5), (8,), (9,)], [(1, 7, 4), (2, 6, 5, 3), (8,), (9,)], [(1, 7, 4, 2, 6, 5, 3), (8,), (9,)], [(1, 7, 3, 2, 6, 4), (5,), (8,), (9,)], [(1, 7, 3), (2, 6, 4), (5,), (8,), (9,)], [(1, 7, 4), (2, 6, 3), (5,), (8,), (9,)], [(1, 7, 4, 2, 6, 3), (5,), (8,), (9,)], [(1, 7, 2, 6, 3), (4, 5), (8,), (9,)], [(1, 7, 3), (2, 6), (4, 5), (8,), (9,)], [(1, 7, 3), (2, 6, 4, 5), (8,), (9,)], [(1, 7, 4, 5, 3), (2, 6), (8,), (9,)], [(1, 7, 4, 5, 2, 6, 3), (8,), (9,)], [(1, 7, 4, 3, 5, 2, 6), (8,), (9,)], [(1, 7, 4, 3, 5), (2, 6), (8,), (9,)], [(1, 7, 4), (2, 6), (3, 5), (8,), (9,)], [(1, 7, 4, 2, 6, 3, 5), (8,), (9,)], [(1, 7, 4), (2, 6, 3, 5), (8,), (9,)], [(1, 7, 3, 5), (2, 6, 4), (8,), (9,)], [(1, 7, 3, 5, 2, 6, 4), (8,), (9,)], [(1, 7, 2, 6, 3, 5, 4), (8,), (9,)], [(1, 7, 3, 5, 4), (2, 6), (8,), (9,)], [(1, 7), (2, 6), (3, 5), (4,), (8,), (9,)], [(1, 7, 2, 6), (3, 5), (4,), (8,), (9,)], [(1, 7, 2, 6, 3, 5), (4,), (8,), (9,)], [(1, 7, 3, 5, 2, 6), (4,), (8,), (9,)], [(1, 7, 3, 5), (2, 6), (4,), (8,), (9,)], [(1, 3), (2,), (4,), (5,), (6,), (7, 8), (9,)], [(1, 3, 2), (4,), (5,), (6,), (7, 8), (9,)], [(1,), (2, 3), (4,), (5,), (6,), (7, 8), (9,)], [(1, 2), (3,), (4,), (5,), (6,), (7, 8), (9,)], [(1,), (2,), (3,), (4,), (5,), (6,), (7, 8), (9,)], [(1, 2), (3, 4), (5,), (6,), (7, 8), (9,)], [(1,), (2,), (3, 4), (5,), (6,), (7, 8), (9,)], [(1,), (2, 4), (3,), (5,), (6,), (7, 8), (9,)], [(1,), (2, 4, 3), (5,), (6,), (7, 8), (9,)], [(1, 4), (2, 3), (5,), (6,), (7, 8), (9,)], [(1, 4, 2, 3), (5,), (6,), (7, 8), (9,)], [(1, 4, 2), (3,), (5,), (6,), (7, 8), (9,)], [(1, 4, 3), (2,), (5,), (6,), (7, 8), (9,)], [(1, 4, 3, 2), (5,), (6,), (7, 8), (9,)], [(1, 3), (2,), (4, 5), (6,), (7, 8), (9,)], [(1, 3, 2), (4, 5), (6,), (7, 8), (9,)], [(1,), (2, 3), (4, 5), (6,), (7, 8), (9,)], [(1, 2), (3,), (4, 5), (6,), (7, 8), (9,)], [(1,), (2,), (3,), (4, 5), (6,), (7, 8), (9,)], [(1, 2), (3, 5), (4,), (6,), (7, 8), (9,)], [(1,), (2,), (3, 5), (4,), (6,), (7, 8), (9,)], [(1, 2), (3, 5, 4), (6,), (7, 8), (9,)], [(1,), (2,), (3, 5, 4), (6,), (7, 8), (9,)], [(1,), (2, 5), (3, 4), (6,), (7, 8), (9,)], [(1,), (2, 5, 3, 4), (6,), (7, 8), (9,)], [(1,), (2, 5, 3), (4,), (6,), (7, 8), (9,)], [(1,), (2, 5, 4), (3,), (6,), (7, 8), (9,)], [(1,), (2, 5, 4, 3), (6,), (7, 8), (9,)], [(1, 5, 4), (2, 3), (6,), (7, 8), (9,)], [(1, 5, 4, 2, 3), (6,), (7, 8), (9,)], [(1, 5, 4, 2), (3,), (6,), (7, 8), (9,)], [(1, 5, 4, 3), (2,), (6,), (7, 8), (9,)], [(1, 5, 4, 3, 2), (6,), (7, 8), (9,)], [(1, 5, 3), (2,), (4,), (6,), (7, 8), (9,)], [(1, 5, 3, 2), (4,), (6,), (7, 8), (9,)], [(1, 5, 2), (3, 4), (6,), (7, 8), (9,)], [(1, 5, 3, 4, 2), (6,), (7, 8), (9,)], [(1, 5), (2, 4), (3,), (6,), (7, 8), (9,)], [(1, 5, 2, 4), (3,), (6,), (7, 8), (9,)], [(1, 5, 2, 4, 3), (6,), (7, 8), (9,)], [(1, 5, 3, 2, 4), (6,), (7, 8), (9,)], [(1, 5, 3), (2, 4), (6,), (7, 8), (9,)], [(1, 3), (2,), (4,), (5, 6), (7, 8), (9,)], [(1, 3, 2), (4,), (5, 6), (7, 8), (9,)], [(1,), (2, 3), (4,), (5, 6), (7, 8), (9,)], [(1, 2), (3,), (4,), (5, 6), (7, 8), (9,)], [(1,), (2,), (3,), (4,), (5, 6), (7, 8), (9,)], [(1, 2), (3, 4), (5, 6), (7, 8), (9,)], [(1,), (2,), (3, 4), (5, 6), (7, 8), (9,)], [(1,), (2, 4), (3,), (5, 6), (7, 8), (9,)], [(1,), (2, 4, 3), (5, 6), (7, 8), (9,)], [(1, 4), (2, 3), (5, 6), (7, 8), (9,)], [(1, 4, 2, 3), (5, 6), (7, 8), (9,)], [(1, 4, 2), (3,), (5, 6), (7, 8), (9,)], [(1, 4, 3), (2,), (5, 6), (7, 8), (9,)], [(1, 4, 3, 2), (5, 6), (7, 8), (9,)], [(1, 3), (2,), (4, 6), (5,), (7, 8), (9,)], [(1, 3, 2), (4, 6), (5,), (7, 8), (9,)], [(1,), (2, 3), (4, 6), (5,), (7, 8), (9,)], [(1, 2), (3,), (4, 6), (5,), (7, 8), (9,)], [(1,), (2,), (3,), (4, 6), (5,), (7, 8), (9,)], [(1, 3), (2,), (4, 6, 5), (7, 8), (9,)], [(1, 3, 2), (4, 6, 5), (7, 8), (9,)], [(1,), (2, 3), (4, 6, 5), (7, 8), (9,)], [(1, 2), (3,), (4, 6, 5), (7, 8), (9,)], [(1,), (2,), (3,), (4, 6, 5), (7, 8), (9,)], [(1, 2), (3, 6), (4, 5), (7, 8), (9,)], [(1,), (2,), (3, 6), (4, 5), (7, 8), (9,)], [(1, 2), (3, 6, 4, 5), (7, 8), (9,)], [(1,), (2,), (3, 6, 4, 5), (7, 8), (9,)], [(1, 2), (3, 6, 4), (5,), (7, 8), (9,)], [(1,), (2,), (3, 6, 4), (5,), (7, 8), (9,)], [(1, 2), (3, 6, 5), (4,), (7, 8), (9,)], [(1,), (2,), (3, 6, 5), (4,), (7, 8), (9,)], [(1, 2), (3, 6, 5, 4), (7, 8), (9,)], [(1,), (2,), (3, 6, 5, 4), (7, 8), (9,)], [(1,), (2, 6, 5), (3, 4), (7, 8), (9,)], [(1,), (2, 6, 5, 3, 4), (7, 8), (9,)], [(1,), (2, 6, 5, 3), (4,), (7, 8), (9,)], [(1,), (2, 6, 5, 4), (3,), (7, 8), (9,)], [(1,), (2, 6, 5, 4, 3), (7, 8), (9,)], [(1,), (2, 6, 4), (3,), (5,), (7, 8), (9,)], [(1,), (2, 6, 4, 3), (5,), (7, 8), (9,)], [(1,), (2, 6, 3), (4, 5), (7, 8), (9,)], [(1,), (2, 6, 4, 5, 3), (7, 8), (9,)], [(1,), (2, 6), (3, 5), (4,), (7, 8), (9,)], [(1,), (2, 6, 3, 5), (4,), (7, 8), (9,)], [(1,), (2, 6, 3, 5, 4), (7, 8), (9,)], [(1,), (2, 6, 4, 3, 5), (7, 8), (9,)], [(1,), (2, 6, 4), (3, 5), (7, 8), (9,)], [(1, 6, 5, 4), (2, 3), (7, 8), (9,)], [(1, 6, 5, 4, 2, 3), (7, 8), (9,)], [(1, 6, 5, 4, 2), (3,), (7, 8), (9,)], [(1, 6, 5, 4, 3), (2,), (7, 8), (9,)], [(1, 6, 5, 4, 3, 2), (7, 8), (9,)], [(1, 6, 5, 3), (2,), (4,), (7, 8), (9,)], [(1, 6, 5, 3, 2), (4,), (7, 8), (9,)], [(1, 6, 5, 2), (3, 4), (7, 8), (9,)], [(1, 6, 5, 3, 4, 2), (7, 8), (9,)], [(1, 6, 5), (2, 4), (3,), (7, 8), (9,)], [(1, 6, 5, 2, 4), (3,), (7, 8), (9,)], [(1, 6, 5, 2, 4, 3), (7, 8), (9,)], [(1, 6, 5, 3, 2, 4), (7, 8), (9,)], [(1, 6, 5, 3), (2, 4), (7, 8), (9,)], [(1, 6, 4), (2, 3), (5,), (7, 8), (9,)], [(1, 6, 4, 2, 3), (5,), (7, 8), (9,)], [(1, 6, 4, 2), (3,), (5,), (7, 8), (9,)], [(1, 6, 4, 3), (2,), (5,), (7, 8), (9,)], [(1, 6, 4, 3, 2), (5,), (7, 8), (9,)], [(1, 6, 3), (2,), (4, 5), (7, 8), (9,)], [(1, 6, 3, 2), (4, 5), (7, 8), (9,)], [(1, 6, 4, 5, 3), (2,), (7, 8), (9,)], [(1, 6, 4, 5, 3, 2), (7, 8), (9,)], [(1, 6, 2), (3, 5), (4,), (7, 8), (9,)], [(1, 6, 3, 5, 2), (4,), (7, 8), (9,)], [(1, 6, 3, 5, 4, 2), (7, 8), (9,)], [(1, 6, 4, 3, 5, 2), (7, 8), (9,)], [(1, 6, 4, 2), (3, 5), (7, 8), (9,)], [(1, 6, 4, 2, 5), (3,), (7, 8), (9,)], [(1, 6, 4), (2, 5), (3,), (7, 8), (9,)], [(1, 6, 4, 3), (2, 5), (7, 8), (9,)], [(1, 6, 4), (2, 5, 3), (7, 8), (9,)], [(1, 6, 4, 2, 5, 3), (7, 8), (9,)], [(1, 6, 3, 2, 5, 4), (7, 8), (9,)], [(1, 6, 3), (2, 5, 4), (7, 8), (9,)], [(1, 6, 2, 5, 3), (4,), (7, 8), (9,)], [(1, 6, 3), (2, 5), (4,), (7, 8), (9,)], [(1, 6), (2, 5), (3, 4), (7, 8), (9,)], [(1, 6, 2, 5), (3, 4), (7, 8), (9,)], [(1, 6, 2, 5, 3, 4), (7, 8), (9,)], [(1, 6, 3, 4, 2, 5), (7, 8), (9,)], [(1, 6, 3, 4), (2, 5), (7, 8), (9,)], [(1, 3), (2,), (4,), (5,), (6, 8), (7,), (9,)], [(1, 3, 2), (4,), (5,), (6, 8), (7,), (9,)], [(1,), (2, 3), (4,), (5,), (6, 8), (7,), (9,)], [(1, 2), (3,), (4,), (5,), (6, 8), (7,), (9,)], [(1,), (2,), (3,), (4,), (5,), (6, 8), (7,), (9,)], [(1, 2), (3, 4), (5,), (6, 8), (7,), (9,)], [(1,), (2,), (3, 4), (5,), (6, 8), (7,), (9,)], [(1,), (2, 4), (3,), (5,), (6, 8), (7,), (9,)], [(1,), (2, 4, 3), (5,), (6, 8), (7,), (9,)], [(1, 4), (2, 3), (5,), (6, 8), (7,), (9,)], [(1, 4, 2, 3), (5,), (6, 8), (7,), (9,)], [(1, 4, 2), (3,), (5,), (6, 8), (7,), (9,)], [(1, 4, 3), (2,), (5,), (6, 8), (7,), (9,)], [(1, 4, 3, 2), (5,), (6, 8), (7,), (9,)], [(1, 3), (2,), (4, 5), (6, 8), (7,), (9,)], [(1, 3, 2), (4, 5), (6, 8), (7,), (9,)], [(1,), (2, 3), (4, 5), (6, 8), (7,), (9,)], [(1, 2), (3,), (4, 5), (6, 8), (7,), (9,)], [(1,), (2,), (3,), (4, 5), (6, 8), (7,), (9,)], [(1, 2), (3, 5), (4,), (6, 8), (7,), (9,)], [(1,), (2,), (3, 5), (4,), (6, 8), (7,), (9,)], [(1, 2), (3, 5, 4), (6, 8), (7,), (9,)], [(1,), (2,), (3, 5, 4), (6, 8), (7,), (9,)], [(1,), (2, 5), (3, 4), (6, 8), (7,), (9,)], [(1,), (2, 5, 3, 4), (6, 8), (7,), (9,)], [(1,), (2, 5, 3), (4,), (6, 8), (7,), (9,)], [(1,), (2, 5, 4), (3,), (6, 8), (7,), (9,)], [(1,), (2, 5, 4, 3), (6, 8), (7,), (9,)], [(1, 5, 4), (2, 3), (6, 8), (7,), (9,)], [(1, 5, 4, 2, 3), (6, 8), (7,), (9,)], [(1, 5, 4, 2), (3,), (6, 8), (7,), (9,)], [(1, 5, 4, 3), (2,), (6, 8), (7,), (9,)], [(1, 5, 4, 3, 2), (6, 8), (7,), (9,)], [(1, 5, 3), (2,), (4,), (6, 8), (7,), (9,)], [(1, 5, 3, 2), (4,), (6, 8), (7,), (9,)], [(1, 5, 2), (3, 4), (6, 8), (7,), (9,)], [(1, 5, 3, 4, 2), (6, 8), (7,), (9,)], [(1, 5), (2, 4), (3,), (6, 8), (7,), (9,)], [(1, 5, 2, 4), (3,), (6, 8), (7,), (9,)], [(1, 5, 2, 4, 3), (6, 8), (7,), (9,)], [(1, 5, 3, 2, 4), (6, 8), (7,), (9,)], [(1, 5, 3), (2, 4), (6, 8), (7,), (9,)], [(1, 3), (2,), (4,), (5,), (6, 8, 7), (9,)], [(1, 3, 2), (4,), (5,), (6, 8, 7), (9,)], [(1,), (2, 3), (4,), (5,), (6, 8, 7), (9,)], [(1, 2), (3,), (4,), (5,), (6, 8, 7), (9,)], [(1,), (2,), (3,), (4,), (5,), (6, 8, 7), (9,)], [(1, 2), (3, 4), (5,), (6, 8, 7), (9,)], [(1,), (2,), (3, 4), (5,), (6, 8, 7), (9,)], [(1,), (2, 4), (3,), (5,), (6, 8, 7), (9,)], [(1,), (2, 4, 3), (5,), (6, 8, 7), (9,)], [(1, 4), (2, 3), (5,), (6, 8, 7), (9,)], [(1, 4, 2, 3), (5,), (6, 8, 7), (9,)], [(1, 4, 2), (3,), (5,), (6, 8, 7), (9,)], [(1, 4, 3), (2,), (5,), (6, 8, 7), (9,)], [(1, 4, 3, 2), (5,), (6, 8, 7), (9,)], [(1, 3), (2,), (4, 5), (6, 8, 7), (9,)], [(1, 3, 2), (4, 5), (6, 8, 7), (9,)], [(1,), (2, 3), (4, 5), (6, 8, 7), (9,)], [(1, 2), (3,), (4, 5), (6, 8, 7), (9,)], [(1,), (2,), (3,), (4, 5), (6, 8, 7), (9,)], [(1, 2), (3, 5), (4,), (6, 8, 7), (9,)], [(1,), (2,), (3, 5), (4,), (6, 8, 7), (9,)], [(1, 2), (3, 5, 4), (6, 8, 7), (9,)], [(1,), (2,), (3, 5, 4), (6, 8, 7), (9,)], [(1,), (2, 5), (3, 4), (6, 8, 7), (9,)], [(1,), (2, 5, 3, 4), (6, 8, 7), (9,)], [(1,), (2, 5, 3), (4,), (6, 8, 7), (9,)], [(1,), (2, 5, 4), (3,), (6, 8, 7), (9,)], [(1,), (2, 5, 4, 3), (6, 8, 7), (9,)], [(1, 5, 4), (2, 3), (6, 8, 7), (9,)], [(1, 5, 4, 2, 3), (6, 8, 7), (9,)], [(1, 5, 4, 2), (3,), (6, 8, 7), (9,)], [(1, 5, 4, 3), (2,), (6, 8, 7), (9,)], [(1, 5, 4, 3, 2), (6, 8, 7), (9,)], [(1, 5, 3), (2,), (4,), (6, 8, 7), (9,)], [(1, 5, 3, 2), (4,), (6, 8, 7), (9,)], [(1, 5, 2), (3, 4), (6, 8, 7), (9,)], [(1, 5, 3, 4, 2), (6, 8, 7), (9,)], [(1, 5), (2, 4), (3,), (6, 8, 7), (9,)], [(1, 5, 2, 4), (3,), (6, 8, 7), (9,)], [(1, 5, 2, 4, 3), (6, 8, 7), (9,)], [(1, 5, 3, 2, 4), (6, 8, 7), (9,)], [(1, 5, 3), (2, 4), (6, 8, 7), (9,)], [(1, 3), (2,), (4,), (5, 8), (6, 7), (9,)], [(1, 3, 2), (4,), (5, 8), (6, 7), (9,)], [(1,), (2, 3), (4,), (5, 8), (6, 7), (9,)], [(1, 2), (3,), (4,), (5, 8), (6, 7), (9,)], [(1,), (2,), (3,), (4,), (5, 8), (6, 7), (9,)], [(1, 2), (3, 4), (5, 8), (6, 7), (9,)], [(1,), (2,), (3, 4), (5, 8), (6, 7), (9,)], [(1,), (2, 4), (3,), (5, 8), (6, 7), (9,)], [(1,), (2, 4, 3), (5, 8), (6, 7), (9,)], [(1, 4), (2, 3), (5, 8), (6, 7), (9,)], [(1, 4, 2, 3), (5, 8), (6, 7), (9,)], [(1, 4, 2), (3,), (5, 8), (6, 7), (9,)], [(1, 4, 3), (2,), (5, 8), (6, 7), (9,)], [(1, 4, 3, 2), (5, 8), (6, 7), (9,)], [(1, 3), (2,), (4,), (5, 8, 6, 7), (9,)], [(1, 3, 2), (4,), (5, 8, 6, 7), (9,)], [(1,), (2, 3), (4,), (5, 8, 6, 7), (9,)], [(1, 2), (3,), (4,), (5, 8, 6, 7), (9,)], [(1,), (2,), (3,), (4,), (5, 8, 6, 7), (9,)], [(1, 2), (3, 4), (5, 8, 6, 7), (9,)], [(1,), (2,), (3, 4), (5, 8, 6, 7), (9,)], [(1,), (2, 4), (3,), (5, 8, 6, 7), (9,)], [(1,), (2, 4, 3), (5, 8, 6, 7), (9,)], [(1, 4), (2, 3), (5, 8, 6, 7), (9,)], [(1, 4, 2, 3), (5, 8, 6, 7), (9,)], [(1, 4, 2), (3,), (5, 8, 6, 7), (9,)], [(1, 4, 3), (2,), (5, 8, 6, 7), (9,)], [(1, 4, 3, 2), (5, 8, 6, 7), (9,)], [(1, 3), (2,), (4,), (5, 8, 6), (7,), (9,)], [(1, 3, 2), (4,), (5, 8, 6), (7,), (9,)], [(1,), (2, 3), (4,), (5, 8, 6), (7,), (9,)], [(1, 2), (3,), (4,), (5, 8, 6), (7,), (9,)], [(1,), (2,), (3,), (4,), (5, 8, 6), (7,), (9,)], [(1, 2), (3, 4), (5, 8, 6), (7,), (9,)], [(1,), (2,), (3, 4), (5, 8, 6), (7,), (9,)], [(1,), (2, 4), (3,), (5, 8, 6), (7,), (9,)], [(1,), (2, 4, 3), (5, 8, 6), (7,), (9,)], [(1, 4), (2, 3), (5, 8, 6), (7,), (9,)], [(1, 4, 2, 3), (5, 8, 6), (7,), (9,)], [(1, 4, 2), (3,), (5, 8, 6), (7,), (9,)], [(1, 4, 3), (2,), (5, 8, 6), (7,), (9,)], [(1, 4, 3, 2), (5, 8, 6), (7,), (9,)], [(1, 3), (2,), (4,), (5, 8, 7), (6,), (9,)], [(1, 3, 2), (4,), (5, 8, 7), (6,), (9,)], [(1,), (2, 3), (4,), (5, 8, 7), (6,), (9,)], [(1, 2), (3,), (4,), (5, 8, 7), (6,), (9,)], [(1,), (2,), (3,), (4,), (5, 8, 7), (6,), (9,)], [(1, 2), (3, 4), (5, 8, 7), (6,), (9,)], [(1,), (2,), (3, 4), (5, 8, 7), (6,), (9,)], [(1,), (2, 4), (3,), (5, 8, 7), (6,), (9,)], [(1,), (2, 4, 3), (5, 8, 7), (6,), (9,)], [(1, 4), (2, 3), (5, 8, 7), (6,), (9,)], [(1, 4, 2, 3), (5, 8, 7), (6,), (9,)], [(1, 4, 2), (3,), (5, 8, 7), (6,), (9,)], [(1, 4, 3), (2,), (5, 8, 7), (6,), (9,)], [(1, 4, 3, 2), (5, 8, 7), (6,), (9,)], [(1, 3), (2,), (4,), (5, 8, 7, 6), (9,)], [(1, 3, 2), (4,), (5, 8, 7, 6), (9,)], [(1,), (2, 3), (4,), (5, 8, 7, 6), (9,)], [(1, 2), (3,), (4,), (5, 8, 7, 6), (9,)], [(1,), (2,), (3,), (4,), (5, 8, 7, 6), (9,)], [(1, 2), (3, 4), (5, 8, 7, 6), (9,)], [(1,), (2,), (3, 4), (5, 8, 7, 6), (9,)], [(1,), (2, 4), (3,), (5, 8, 7, 6), (9,)], [(1,), (2, 4, 3), (5, 8, 7, 6), (9,)], [(1, 4), (2, 3), (5, 8, 7, 6), (9,)], [(1, 4, 2, 3), (5, 8, 7, 6), (9,)], [(1, 4, 2), (3,), (5, 8, 7, 6), (9,)], [(1, 4, 3), (2,), (5, 8, 7, 6), (9,)], [(1, 4, 3, 2), (5, 8, 7, 6), (9,)], [(1, 3), (2,), (4, 8, 7), (5, 6), (9,)], [(1, 3, 2), (4, 8, 7), (5, 6), (9,)], [(1,), (2, 3), (4, 8, 7), (5, 6), (9,)], [(1, 2), (3,), (4, 8, 7), (5, 6), (9,)], [(1,), (2,), (3,), (4, 8, 7), (5, 6), (9,)], [(1, 3), (2,), (4, 8, 7, 5, 6), (9,)], [(1, 3, 2), (4, 8, 7, 5, 6), (9,)], [(1,), (2, 3), (4, 8, 7, 5, 6), (9,)], [(1, 2), (3,), (4, 8, 7, 5, 6), (9,)], [(1,), (2,), (3,), (4, 8, 7, 5, 6), (9,)], [(1, 3), (2,), (4, 8, 7, 5), (6,), (9,)], [(1, 3, 2), (4, 8, 7, 5), (6,), (9,)], [(1,), (2, 3), (4, 8, 7, 5), (6,), (9,)], [(1, 2), (3,), (4, 8, 7, 5), (6,), (9,)], [(1,), (2,), (3,), (4, 8, 7, 5), (6,), (9,)], [(1, 3), (2,), (4, 8, 7, 6), (5,), (9,)], [(1, 3, 2), (4, 8, 7, 6), (5,), (9,)], [(1,), (2, 3), (4, 8, 7, 6), (5,), (9,)], [(1, 2), (3,), (4, 8, 7, 6), (5,), (9,)], [(1,), (2,), (3,), (4, 8, 7, 6), (5,), (9,)], [(1, 3), (2,), (4, 8, 7, 6, 5), (9,)], [(1, 3, 2), (4, 8, 7, 6, 5), (9,)], [(1,), (2, 3), (4, 8, 7, 6, 5), (9,)], [(1, 2), (3,), (4, 8, 7, 6, 5), (9,)], [(1,), (2,), (3,), (4, 8, 7, 6, 5), (9,)], [(1, 3), (2,), (4, 8, 6), (5,), (7,), (9,)], [(1, 3, 2), (4, 8, 6), (5,), (7,), (9,)], [(1,), (2, 3), (4, 8, 6), (5,), (7,), (9,)], [(1, 2), (3,), (4, 8, 6), (5,), (7,), (9,)], [(1,), (2,), (3,), (4, 8, 6), (5,), (7,), (9,)], [(1, 3), (2,), (4, 8, 6, 5), (7,), (9,)], [(1, 3, 2), (4, 8, 6, 5), (7,), (9,)], [(1,), (2, 3), (4, 8, 6, 5), (7,), (9,)], [(1, 2), (3,), (4, 8, 6, 5), (7,), (9,)], [(1,), (2,), (3,), (4, 8, 6, 5), (7,), (9,)], [(1, 3), (2,), (4, 8, 5), (6, 7), (9,)], [(1, 3, 2), (4, 8, 5), (6, 7), (9,)], [(1,), (2, 3), (4, 8, 5), (6, 7), (9,)], [(1, 2), (3,), (4, 8, 5), (6, 7), (9,)], [(1,), (2,), (3,), (4, 8, 5), (6, 7), (9,)], [(1, 3), (2,), (4, 8, 6, 7, 5), (9,)], [(1, 3, 2), (4, 8, 6, 7, 5), (9,)], [(1,), (2, 3), (4, 8, 6, 7, 5), (9,)], [(1, 2), (3,), (4, 8, 6, 7, 5), (9,)], [(1,), (2,), (3,), (4, 8, 6, 7, 5), (9,)], [(1, 3), (2,), (4, 8), (5, 7), (6,), (9,)], [(1, 3, 2), (4, 8), (5, 7), (6,), (9,)], [(1,), (2, 3), (4, 8), (5, 7), (6,), (9,)], [(1, 2), (3,), (4, 8), (5, 7), (6,), (9,)], [(1,), (2,), (3,), (4, 8), (5, 7), (6,), (9,)], [(1, 3), (2,), (4, 8, 5, 7), (6,), (9,)], [(1, 3, 2), (4, 8, 5, 7), (6,), (9,)], [(1,), (2, 3), (4, 8, 5, 7), (6,), (9,)], [(1, 2), (3,), (4, 8, 5, 7), (6,), (9,)], [(1,), (2,), (3,), (4, 8, 5, 7), (6,), (9,)], [(1, 3), (2,), (4, 8, 5, 7, 6), (9,)], [(1, 3, 2), (4, 8, 5, 7, 6), (9,)], [(1,), (2, 3), (4, 8, 5, 7, 6), (9,)], [(1, 2), (3,), (4, 8, 5, 7, 6), (9,)], [(1,), (2,), (3,), (4, 8, 5, 7, 6), (9,)], [(1, 3), (2,), (4, 8, 6, 5, 7), (9,)], [(1, 3, 2), (4, 8, 6, 5, 7), (9,)], [(1,), (2, 3), (4, 8, 6, 5, 7), (9,)], [(1, 2), (3,), (4, 8, 6, 5, 7), (9,)], [(1,), (2,), (3,), (4, 8, 6, 5, 7), (9,)], [(1, 3), (2,), (4, 8, 6), (5, 7), (9,)], [(1, 3, 2), (4, 8, 6), (5, 7), (9,)], [(1,), (2, 3), (4, 8, 6), (5, 7), (9,)], [(1, 2), (3,), (4, 8, 6), (5, 7), (9,)], [(1,), (2,), (3,), (4, 8, 6), (5, 7), (9,)], [(1, 2), (3, 8, 7, 6), (4, 5), (9,)], [(1,), (2,), (3, 8, 7, 6), (4, 5), (9,)], [(1, 2), (3, 8, 7, 6, 4, 5), (9,)], [(1,), (2,), (3, 8, 7, 6, 4, 5), (9,)], [(1, 2), (3, 8, 7, 6, 4), (5,), (9,)], [(1,), (2,), (3, 8, 7, 6, 4), (5,), (9,)], [(1, 2), (3, 8, 7, 6, 5), (4,), (9,)], [(1,), (2,), (3, 8, 7, 6, 5), (4,), (9,)], [(1, 2), (3, 8, 7, 6, 5, 4), (9,)], [(1,), (2,), (3, 8, 7, 6, 5, 4), (9,)], [(1, 2), (3, 8, 7, 5), (4,), (6,), (9,)], [(1,), (2,), (3, 8, 7, 5), (4,), (6,), (9,)], [(1, 2), (3, 8, 7, 5, 4), (6,), (9,)], [(1,), (2,), (3, 8, 7, 5, 4), (6,), (9,)], [(1, 2), (3, 8, 7, 4), (5, 6), (9,)], [(1,), (2,), (3, 8, 7, 4), (5, 6), (9,)], [(1, 2), (3, 8, 7, 5, 6, 4), (9,)], [(1,), (2,), (3, 8, 7, 5, 6, 4), (9,)], [(1, 2), (3, 8, 7), (4, 6), (5,), (9,)], [(1,), (2,), (3, 8, 7), (4, 6), (5,), (9,)], [(1, 2), (3, 8, 7, 4, 6), (5,), (9,)], [(1,), (2,), (3, 8, 7, 4, 6), (5,), (9,)], [(1, 2), (3, 8, 7, 4, 6, 5), (9,)], [(1,), (2,), (3, 8, 7, 4, 6, 5), (9,)], [(1, 2), (3, 8, 7, 5, 4, 6), (9,)], [(1,), (2,), (3, 8, 7, 5, 4, 6), (9,)], [(1, 2), (3, 8, 7, 5), (4, 6), (9,)], [(1,), (2,), (3, 8, 7, 5), (4, 6), (9,)], [(1, 2), (3, 8, 6), (4, 5), (7,), (9,)], [(1,), (2,), (3, 8, 6), (4, 5), (7,), (9,)], [(1, 2), (3, 8, 6, 4, 5), (7,), (9,)], [(1,), (2,), (3, 8, 6, 4, 5), (7,), (9,)], [(1, 2), (3, 8, 6, 4), (5,), (7,), (9,)], [(1,), (2,), (3, 8, 6, 4), (5,), (7,), (9,)], [(1, 2), (3, 8, 6, 5), (4,), (7,), (9,)], [(1,), (2,), (3, 8, 6, 5), (4,), (7,), (9,)], [(1, 2), (3, 8, 6, 5, 4), (7,), (9,)], [(1,), (2,), (3, 8, 6, 5, 4), (7,), (9,)], [(1, 2), (3, 8, 5), (4,), (6, 7), (9,)], [(1,), (2,), (3, 8, 5), (4,), (6, 7), (9,)], [(1, 2), (3, 8, 5, 4), (6, 7), (9,)], [(1,), (2,), (3, 8, 5, 4), (6, 7), (9,)], [(1, 2), (3, 8, 6, 7, 5), (4,), (9,)], [(1,), (2,), (3, 8, 6, 7, 5), (4,), (9,)], [(1, 2), (3, 8, 6, 7, 5, 4), (9,)], [(1,), (2,), (3, 8, 6, 7, 5, 4), (9,)], [(1, 2), (3, 8, 4), (5, 7), (6,), (9,)], [(1,), (2,), (3, 8, 4), (5, 7), (6,), (9,)], [(1, 2), (3, 8, 5, 7, 4), (6,), (9,)], [(1,), (2,), (3, 8, 5, 7, 4), (6,), (9,)], [(1, 2), (3, 8, 5, 7, 6, 4), (9,)], [(1,), (2,), (3, 8, 5, 7, 6, 4), (9,)], [(1, 2), (3, 8, 6, 5, 7, 4), (9,)], [(1,), (2,), (3, 8, 6, 5, 7, 4), (9,)], [(1, 2), (3, 8, 6, 4), (5, 7), (9,)], [(1,), (2,), (3, 8, 6, 4), (5, 7), (9,)], [(1, 2), (3, 8, 6, 4, 7), (5,), (9,)], [(1,), (2,), (3, 8, 6, 4, 7), (5,), (9,)], [(1, 2), (3, 8, 6), (4, 7), (5,), (9,)], [(1,), (2,), (3, 8, 6), (4, 7), (5,), (9,)], [(1, 2), (3, 8, 6, 5), (4, 7), (9,)], [(1,), (2,), (3, 8, 6, 5), (4, 7), (9,)], [(1, 2), (3, 8, 6), (4, 7, 5), (9,)], [(1,), (2,), (3, 8, 6), (4, 7, 5), (9,)], [(1, 2), (3, 8, 6, 4, 7, 5), (9,)], [(1,), (2,), (3, 8, 6, 4, 7, 5), (9,)], [(1, 2), (3, 8, 5, 4, 7, 6), (9,)], [(1,), (2,), (3, 8, 5, 4, 7, 6), (9,)], [(1, 2), (3, 8, 5), (4, 7, 6), (9,)], [(1,), (2,), (3, 8, 5), (4, 7, 6), (9,)], [(1, 2), (3, 8, 4, 7, 5), (6,), (9,)], [(1,), (2,), (3, 8, 4, 7, 5), (6,), (9,)], [(1, 2), (3, 8, 5), (4, 7), (6,), (9,)], [(1,), (2,), (3, 8, 5), (4, 7), (6,), (9,)], [(1, 2), (3, 8), (4, 7), (5, 6), (9,)], [(1,), (2,), (3, 8), (4, 7), (5, 6), (9,)], [(1, 2), (3, 8, 4, 7), (5, 6), (9,)], [(1,), (2,), (3, 8, 4, 7), (5, 6), (9,)], [(1, 2), (3, 8, 4, 7, 5, 6), (9,)], [(1,), (2,), (3, 8, 4, 7, 5, 6), (9,)], [(1, 2), (3, 8, 5, 6, 4, 7), (9,)], [(1,), (2,), (3, 8, 5, 6, 4, 7), (9,)], [(1, 2), (3, 8, 5, 6), (4, 7), (9,)], [(1,), (2,), (3, 8, 5, 6), (4, 7), (9,)], [(1,), (2, 8, 7, 6, 5), (3, 4), (9,)], [(1,), (2, 8, 7, 6, 5, 3, 4), (9,)], [(1,), (2, 8, 7, 6, 5, 3), (4,), (9,)], [(1,), (2, 8, 7, 6, 5, 4), (3,), (9,)], [(1,), (2, 8, 7, 6, 5, 4, 3), (9,)], [(1,), (2, 8, 7, 6, 4), (3,), (5,), (9,)], [(1,), (2, 8, 7, 6, 4, 3), (5,), (9,)], [(1,), (2, 8, 7, 6, 3), (4, 5), (9,)], [(1,), (2, 8, 7, 6, 4, 5, 3), (9,)], [(1,), (2, 8, 7, 6), (3, 5), (4,), (9,)], [(1,), (2, 8, 7, 6, 3, 5), (4,), (9,)], [(1,), (2, 8, 7, 6, 3, 5, 4), (9,)], [(1,), (2, 8, 7, 6, 4, 3, 5), (9,)], [(1,), (2, 8, 7, 6, 4), (3, 5), (9,)], [(1,), (2, 8, 7, 5), (3, 4), (6,), (9,)], [(1,), (2, 8, 7, 5, 3, 4), (6,), (9,)], [(1,), (2, 8, 7, 5, 3), (4,), (6,), (9,)], [(1,), (2, 8, 7, 5, 4), (3,), (6,), (9,)], [(1,), (2, 8, 7, 5, 4, 3), (6,), (9,)], [(1,), (2, 8, 7, 4), (3,), (5, 6), (9,)], [(1,), (2, 8, 7, 4, 3), (5, 6), (9,)], [(1,), (2, 8, 7, 5, 6, 4), (3,), (9,)], [(1,), (2, 8, 7, 5, 6, 4, 3), (9,)], [(1,), (2, 8, 7, 3), (4, 6), (5,), (9,)], [(1,), (2, 8, 7, 4, 6, 3), (5,), (9,)], [(1,), (2, 8, 7, 4, 6, 5, 3), (9,)], [(1,), (2, 8, 7, 5, 4, 6, 3), (9,)], [(1,), (2, 8, 7, 5, 3), (4, 6), (9,)], [(1,), (2, 8, 7, 5, 3, 6), (4,), (9,)], [(1,), (2, 8, 7, 5), (3, 6), (4,), (9,)], [(1,), (2, 8, 7, 5, 4), (3, 6), (9,)], [(1,), (2, 8, 7, 5), (3, 6, 4), (9,)], [(1,), (2, 8, 7, 5, 3, 6, 4), (9,)], [(1,), (2, 8, 7, 4, 3, 6, 5), (9,)], [(1,), (2, 8, 7, 4), (3, 6, 5), (9,)], [(1,), (2, 8, 7, 3, 6, 4), (5,), (9,)], [(1,), (2, 8, 7, 4), (3, 6), (5,), (9,)], [(1,), (2, 8, 7), (3, 6), (4, 5), (9,)], [(1,), (2, 8, 7, 3, 6), (4, 5), (9,)], [(1,), (2, 8, 7, 3, 6, 4, 5), (9,)], [(1,), (2, 8, 7, 4, 5, 3, 6), (9,)], [(1,), (2, 8, 7, 4, 5), (3, 6), (9,)], [(1,), (2, 8, 6, 5), (3, 4), (7,), (9,)], [(1,), (2, 8, 6, 5, 3, 4), (7,), (9,)], [(1,), (2, 8, 6, 5, 3), (4,), (7,), (9,)], [(1,), (2, 8, 6, 5, 4), (3,), (7,), (9,)], [(1,), (2, 8, 6, 5, 4, 3), (7,), (9,)], [(1,), (2, 8, 6, 4), (3,), (5,), (7,), (9,)], [(1,), (2, 8, 6, 4, 3), (5,), (7,), (9,)], [(1,), (2, 8, 6, 3), (4, 5), (7,), (9,)], [(1,), (2, 8, 6, 4, 5, 3), (7,), (9,)], [(1,), (2, 8, 6), (3, 5), (4,), (7,), (9,)], [(1,), (2, 8, 6, 3, 5), (4,), (7,), (9,)], [(1,), (2, 8, 6, 3, 5, 4), (7,), (9,)], [(1,), (2, 8, 6, 4, 3, 5), (7,), (9,)], [(1,), (2, 8, 6, 4), (3, 5), (7,), (9,)], [(1,), (2, 8, 5), (3, 4), (6, 7), (9,)], [(1,), (2, 8, 5, 3, 4), (6, 7), (9,)], [(1,), (2, 8, 5, 3), (4,), (6, 7), (9,)], [(1,), (2, 8, 5, 4), (3,), (6, 7), (9,)], [(1,), (2, 8, 5, 4, 3), (6, 7), (9,)], [(1,), (2, 8, 6, 7, 5), (3, 4), (9,)], [(1,), (2, 8, 6, 7, 5, 3, 4), (9,)], [(1,), (2, 8, 6, 7, 5, 3), (4,), (9,)], [(1,), (2, 8, 6, 7, 5, 4), (3,), (9,)], [(1,), (2, 8, 6, 7, 5, 4, 3), (9,)], [(1,), (2, 8, 4), (3,), (5, 7), (6,), (9,)], [(1,), (2, 8, 4, 3), (5, 7), (6,), (9,)], [(1,), (2, 8, 5, 7, 4), (3,), (6,), (9,)], [(1,), (2, 8, 5, 7, 4, 3), (6,), (9,)], [(1,), (2, 8, 5, 7, 6, 4), (3,), (9,)], [(1,), (2, 8, 5, 7, 6, 4, 3), (9,)], [(1,), (2, 8, 6, 5, 7, 4), (3,), (9,)], [(1,), (2, 8, 6, 5, 7, 4, 3), (9,)], [(1,), (2, 8, 6, 4), (3,), (5, 7), (9,)], [(1,), (2, 8, 6, 4, 3), (5, 7), (9,)], [(1,), (2, 8, 6, 4, 7, 3), (5,), (9,)], [(1,), (2, 8, 6, 3), (4, 7), (5,), (9,)], [(1,), (2, 8, 6, 5, 3), (4, 7), (9,)], [(1,), (2, 8, 6, 3), (4, 7, 5), (9,)], [(1,), (2, 8, 6, 4, 7, 5, 3), (9,)], [(1,), (2, 8, 5, 4, 7, 6, 3), (9,)], [(1,), (2, 8, 5, 3), (4, 7, 6), (9,)], [(1,), (2, 8, 4, 7, 5, 3), (6,), (9,)], [(1,), (2, 8, 5, 3), (4, 7), (6,), (9,)],[...]


New=[]
for i in [0..len(cycles)-1]:
for j in [0..n-2]:
if cycles[i][0][j]==2:
if cycles[i][0][j+1]==n-1:
New.append(cycles[i][0])
print New
len(New)

[(1, 9, 7, 5, 2, 8, 6, 4, 3), (1, 9, 7, 5, 3, 2, 8, 6, 4), (1, 9, 7, 5, 4, 2, 8, 6, 3), (1, 9, 7, 5, 2, 8, 6, 3, 4), (1, 9, 7, 4, 2, 8, 6, 5, 3), (1, 9, 7, 4, 5, 2, 8, 6, 3), (1, 9, 7, 4, 3, 5, 2, 8, 6), (1, 9, 7, 4, 2, 8, 6, 3, 5), (1, 9, 7, 3, 5, 2, 8, 6, 4), (1, 9, 7, 2, 8, 6, 3, 5, 4), (1, 9, 7, 6, 4, 2, 8, 5, 3), (1, 9, 7, 6, 3, 2, 8, 5, 4), (1, 9, 7, 6, 2, 8, 5, 3, 4), (1, 9, 7, 6, 3, 4, 2, 8, 5), (1, 9, 7, 5, 6, 3, 2, 8, 4), (1, 9, 7, 3, 2, 8, 5, 6, 4), (1, 9, 7, 4, 2, 8, 5, 6, 3), (1, 9, 7, 2, 8, 5, 4, 6, 3), (1, 9, 7, 4, 6, 2, 8, 5, 3), (1, 9, 7, 5, 2, 8, 4, 6, 3), (1, 9, 7, 4, 6, 5, 2, 8, 3), (1, 9, 7, 4, 3, 6, 2, 8, 5), (1, 9, 7, 3, 6, 4, 2, 8, 5), (1, 9, 7, 3, 6, 2, 8, 5, 4), (1, 9, 7, 5, 2, 8, 4, 3, 6), (1, 9, 7, 5, 3, 6, 2, 8, 4), (1, 9, 7, 4, 2, 8, 3, 6, 5), (1, 9, 7, 3, 6, 5, 2, 8, 4), (1, 9, 7, 2, 8, 4, 5, 3, 6), (1, 9, 7, 3, 6, 2, 8, 4, 5), (1, 9, 7, 4, 5, 2, 8, 3, 6), (1, 9, 7, 2, 8, 3, 6, 4, 5), (1, 9, 6, 4, 2, 8, 7, 5, 3), (1, 9, 6, 3, 2, 8, 7, 5, 4), (1, 9, 6, 2, 8, 7, 5, 3, 4), (1, 9, 6, 3, 4, 2, 8, 7, 5), (1, 9, 6, 5, 2, 8, 7, 4, 3), (1, 9, 6, 5, 3, 2, 8, 7, 4), (1, 9, 6, 4, 5, 2, 8, 7, 3), (1, 9, 6, 2, 8, 7, 4, 5, 3), (1, 9, 6, 2, 8, 7, 4, 3, 5), (1, 9, 6, 3, 5, 2, 8, 7, 4), (1, 9, 6, 4, 2, 8, 7, 3, 5), (1, 9, 6, 2, 8, 7, 3, 5, 4), (1, 9, 5, 2, 8, 6, 7, 4, 3), (1, 9, 5, 3, 2, 8, 6, 7, 4), (1, 9, 6, 7, 5, 2, 8, 4, 3), (1, 9, 6, 7, 5, 3, 2, 8, 4), (1, 9, 6, 7, 4, 2, 8, 5, 3), (1, 9, 6, 5, 7, 4, 2, 8, 3), (1, 9, 6, 5, 7, 3, 2, 8, 4), (1, 9, 6, 4, 2, 8, 5, 7, 3), (1, 9, 6, 3, 2, 8, 5, 7, 4), (1, 9, 5, 7, 3, 2, 8, 6, 4), (1, 9, 5, 7, 4, 2, 8, 6, 3), (1, 9, 4, 2, 8, 5, 7, 6, 3), (1, 9, 5, 7, 6, 3, 2, 8, 4), (1, 9, 6, 2, 8, 5, 4, 7, 3), (1, 9, 6, 2, 8, 4, 7, 5, 3), (1, 9, 6, 5, 2, 8, 4, 7, 3), (1, 9, 5, 4, 7, 2, 8, 6, 3), (1, 9, 5, 2, 8, 6, 4, 7, 3), (1, 9, 4, 7, 6, 2, 8, 5, 3), (1, 9, 5, 2, 8, 4, 7, 6, 3), (1, 9, 5, 6, 4, 7, 2, 8, 3), (1, 9, 5, 6, 2, 8, 4, 7, 3), (1, 9, 4, 7, 2, 8, 5, 6, 3), (1, 9, 4, 7, 5, 6, 2, 8, 3), (1, 9, 6, 2, 8, 5, 3, 7, 4), (1, 9, 6, 3, 7, 4, 2, 8, 5), (1, 9, 6, 3, 7, 2, 8, 5, 4), (1, 9, 6, 2, 8, 4, 3, 7, 5), (1, 9, 6, 3, 7, 5, 2, 8, 4), (1, 9, 6, 5, 2, 8, 3, 7, 4), (1, 9, 6, 2, 8, 4, 5, 3, 7), (1, 9, 6, 3, 7, 2, 8, 4, 5), (1, 9, 6, 2, 8, 3, 7, 4, 5), (1, 9, 5, 2, 8, 6, 3, 7, 4), (1, 9, 4, 3, 7, 6, 2, 8, 5), (1, 9, 5, 2, 8, 4, 3, 7, 6), (1, 9, 5, 3, 7, 6, 2, 8, 4), (1, 9, 5, 6, 2, 8, 3, 7, 4), (1, 9, 5, 6, 3, 7, 2, 8, 4), (1, 9, 3, 7, 5, 6, 2, 8, 4), (1, 9, 5, 3, 7, 2, 8, 4, 6), (1, 9, 5, 2, 8, 3, 7, 4, 6), (1, 9, 5, 4, 6, 3, 7, 2, 8), (1, 9, 5, 4, 6, 2, 8, 3, 7), (1, 9, 4, 6, 2, 8, 5, 3, 7), (1, 9, 4, 6, 3, 7, 2, 8, 5), (1, 9, 3, 7, 5, 2, 8, 4, 6), (1, 9, 4, 6, 2, 8, 3, 7, 5), (1, 9, 2, 8, 3, 7, 4, 6, 5), (1, 9, 3, 7, 2, 8, 4, 6, 5)] 94
Permutation([6,5,4,2,1,3]).has_pattern([1,2,3])
Permutation([6,5,4,2,1,3]).has_pattern([1,3,2])
Permutation([6,5,4,2,1,3]).has_pattern([2,1,3])
Permutation([6,5,4,2,1,3]).has_pattern([2,3,1])
Permutation([6,5,4,2,1,3]).has_pattern([3,2,1])
Permutation([6,5,4,2,1,3]).has_pattern([3,1,2])


False False True False True True
P=Permutations(n, avoiding=[2,3,1])
P=P.list()
print P
len(P)

[[3, 2, 1, 4], [3, 1, 2, 4], [1, 3, 2, 4], [2, 1, 3, 4], [1, 2, 3, 4], [2, 1, 4, 3], [1, 2, 4, 3], [1, 4, 3, 2], [1, 4, 2, 3], [4, 3, 2, 1], [4, 3, 1, 2], [4, 1, 3, 2], [4, 2, 1, 3], [4, 1, 2, 3]] 14

def is_involution(p):
return p == p.inverse()

n=6
L=[]
P=Permutations(n, avoiding=[2,3,1])
for i in [0..len(P)-1]:
if P[i][0]==n:
L.append(P[i])
print L
len(L)

[[6, 3, 2, 1, 4, 5], [6, 3, 1, 2, 4, 5], [6, 1, 3, 2, 4, 5], [6, 2, 1, 3, 4, 5], [6, 1, 2, 3, 4, 5], [6, 2, 1, 4, 3, 5], [6, 1, 2, 4, 3, 5], [6, 1, 4, 3, 2, 5], [6, 1, 4, 2, 3, 5], [6, 4, 3, 2, 1, 5], [6, 4, 3, 1, 2, 5], [6, 4, 1, 3, 2, 5], [6, 4, 2, 1, 3, 5], [6, 4, 1, 2, 3, 5], [6, 3, 2, 1, 5, 4], [6, 3, 1, 2, 5, 4], [6, 1, 3, 2, 5, 4], [6, 2, 1, 3, 5, 4], [6, 1, 2, 3, 5, 4], [6, 2, 1, 5, 4, 3], [6, 1, 2, 5, 4, 3], [6, 2, 1, 5, 3, 4], [6, 1, 2, 5, 3, 4], [6, 1, 5, 4, 3, 2], [6, 1, 5, 4, 2, 3], [6, 1, 5, 2, 4, 3], [6, 1, 5, 3, 2, 4], [6, 1, 5, 2, 3, 4], [6, 5, 3, 2, 1, 4], [6, 5, 3, 1, 2, 4], [6, 5, 1, 3, 2, 4], [6, 5, 2, 1, 3, 4], [6, 5, 1, 2, 3, 4], [6, 5, 2, 1, 4, 3], [6, 5, 1, 2, 4, 3], [6, 5, 1, 4, 3, 2], [6, 5, 1, 4, 2, 3], [6, 5, 4, 3, 2, 1], [6, 5, 4, 3, 1, 2], [6, 5, 4, 1, 3, 2], [6, 5, 4, 2, 1, 3], [6, 5, 4, 1, 2, 3]] 42
n=7
P=Permutations(n, avoiding=[2,3,1])
L=[]
for i in [0..len(P)-1]:
if P[i].has_pattern([3,2,1]):
if P[i].has_pattern([3,1,2]):
if P[i][0]==n:
if P[i][1]==n-1:
if P[i][n-1]!=1:
if P[i][n-2]!=2:
if P[i].has_pattern([1,2,3]):
if P[i].has_pattern([1,3,2]):
if P[i].has_pattern([2,1,3]):
L.append(P[i])
#               if P[i].has_pattern([2,1,3]):
#                  if P[i].has_pattern([2,3,1]):
#                     if P[i].has_pattern([3,1,2]):
#                        if P[i].has_pattern([3,2,1]):
#                           if P[i][0]==1:
#                              if P[i][1]==n:
#                                 L.append(P[i])
print L
len(L)

[[7, 6, 1, 3, 2, 4, 5], [7, 6, 2, 1, 4, 3, 5], [7, 6, 1, 2, 4, 3, 5], [7, 6, 1, 4, 2, 3, 5], [7, 6, 3, 1, 2, 5, 4], [7, 6, 1, 3, 2, 5, 4], [7, 6, 2, 1, 3, 5, 4], [7, 6, 2, 1, 5, 3, 4]] 8
n=7
P=Permutations(n, avoiding=[2,3,1])
L=[]
d=[]
D=[]
for i in [0..len(P)-1]:
if P[i].has_pattern([1,3,2]):
if P[i].has_pattern([2,1,3]):
if P[i][0]==n:
if P[i][1]==n-1:
if P[i][n-1]!=1:
if P[i][n-2]!=2:
if P[i][2]!=3:
if P[i][3]!=4:
if P[i][4]!=5:
if P[i][5]!=6:
if P[i][6]!=7:
#                                                if P[i][7]!=8:
#                                                    if P[i][8]!=9:
L.append(P[i])
for j in [0..len(L)-1]:
d.append(L[j].inversions())
for k in [0..len(d)-1]:
D.append(len(d[k]))
print L
len(L)
print D
len(D)

[[7, 6, 1, 3, 2, 4, 5], [7, 6, 2, 1, 4, 3, 5], [7, 6, 1, 2, 4, 3, 5], [7, 6, 1, 3, 2, 5, 4], [7, 6, 2, 1, 3, 5, 4], [7, 6, 5, 2, 1, 4, 3]] 6 [12, 13, 12, 13, 13, 17] 6
even=[]
for i in [0..len(D)-1]:
if D[i]%2==0:
even.append(D[i])
len(even)

39
n=6
P=Permutations(n, avoiding=[2,3,1])
P.list()
Q=[]
for i in [0..len(P)-1]:
Q.append(P[i].to_cycles())
#turn all the avoiding oneliners into their cycle notation
print Q
notcycles=[]
cycles=[]
for i in [0..len(Q)-1]:
if len(Q[i])==1:
cycles.append(Q[i])
else:
notcycles.append(Q[i])
print cycles
#print notcycles
print len(cycles)
B=[]
#print len(notcycles)
for i in [0..32]:
B.append(cycles[53+i])
print B
len(B)

[[3, 2, 1, 4, 5, 6], [3, 1, 2, 4, 5, 6], [1, 3, 2, 4, 5, 6], [2, 1, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [2, 1, 4, 3, 5, 6], [1, 2, 4, 3, 5, 6], [1, 4, 3, 2, 5, 6], [1, 4, 2, 3, 5, 6], [4, 3, 2, 1, 5, 6], [4, 3, 1, 2, 5, 6], [4, 1, 3, 2, 5, 6], [4, 2, 1, 3, 5, 6], [4, 1, 2, 3, 5, 6], [3, 2, 1, 5, 4, 6], [3, 1, 2, 5, 4, 6], [1, 3, 2, 5, 4, 6], [2, 1, 3, 5, 4, 6], [1, 2, 3, 5, 4, 6], [2, 1, 5, 4, 3, 6], [1, 2, 5, 4, 3, 6], [2, 1, 5, 3, 4, 6], [1, 2, 5, 3, 4, 6], [1, 5, 4, 3, 2, 6], [1, 5, 4, 2, 3, 6], [1, 5, 2, 4, 3, 6], [1, 5, 3, 2, 4, 6], [1, 5, 2, 3, 4, 6], [5, 3, 2, 1, 4, 6], [5, 3, 1, 2, 4, 6], [5, 1, 3, 2, 4, 6], [5, 2, 1, 3, 4, 6], [5, 1, 2, 3, 4, 6], [5, 2, 1, 4, 3, 6], [5, 1, 2, 4, 3, 6], [5, 1, 4, 3, 2, 6], [5, 1, 4, 2, 3, 6], [5, 4, 3, 2, 1, 6], [5, 4, 3, 1, 2, 6], [5, 4, 1, 3, 2, 6], [5, 4, 2, 1, 3, 6], [5, 4, 1, 2, 3, 6], [3, 2, 1, 4, 6, 5], [3, 1, 2, 4, 6, 5], [1, 3, 2, 4, 6, 5], [2, 1, 3, 4, 6, 5], [1, 2, 3, 4, 6, 5], [2, 1, 4, 3, 6, 5], [1, 2, 4, 3, 6, 5], [1, 4, 3, 2, 6, 5], [1, 4, 2, 3, 6, 5], [4, 3, 2, 1, 6, 5], [4, 3, 1, 2, 6, 5], [4, 1, 3, 2, 6, 5], [4, 2, 1, 3, 6, 5], [4, 1, 2, 3, 6, 5], [3, 2, 1, 6, 5, 4], [3, 1, 2, 6, 5, 4], [1, 3, 2, 6, 5, 4], [2, 1, 3, 6, 5, 4], [1, 2, 3, 6, 5, 4], [3, 2, 1, 6, 4, 5], [3, 1, 2, 6, 4, 5], [1, 3, 2, 6, 4, 5], [2, 1, 3, 6, 4, 5], [1, 2, 3, 6, 4, 5], [2, 1, 6, 5, 4, 3], [1, 2, 6, 5, 4, 3], [2, 1, 6, 5, 3, 4], [1, 2, 6, 5, 3, 4], [2, 1, 6, 3, 5, 4], [1, 2, 6, 3, 5, 4], [2, 1, 6, 4, 3, 5], [1, 2, 6, 4, 3, 5], [2, 1, 6, 3, 4, 5], [1, 2, 6, 3, 4, 5], [1, 6, 4, 3, 2, 5], [1, 6, 4, 2, 3, 5], [1, 6, 2, 4, 3, 5], [1, 6, 3, 2, 4, 5], [1, 6, 2, 3, 4, 5], [1, 6, 3, 2, 5, 4], [1, 6, 2, 3, 5, 4], [1, 6, 2, 5, 4, 3], [1, 6, 2, 5, 3, 4], [1, 6, 5, 4, 3, 2], [1, 6, 5, 4, 2, 3], [1, 6, 5, 2, 4, 3], [1, 6, 5, 3, 2, 4], [1, 6, 5, 2, 3, 4], [6, 3, 2, 1, 4, 5], [6, 3, 1, 2, 4, 5], [6, 1, 3, 2, 4, 5], [6, 2, 1, 3, 4, 5], [6, 1, 2, 3, 4, 5], [6, 2, 1, 4, 3, 5], [6, 1, 2, 4, 3, 5], [6, 1, 4, 3, 2, 5], [6, 1, 4, 2, 3, 5], [6, 4, 3, 2, 1, 5], [6, 4, 3, 1, 2, 5], [6, 4, 1, 3, 2, 5], [6, 4, 2, 1, 3, 5], [6, 4, 1, 2, 3, 5], [6, 3, 2, 1, 5, 4], [6, 3, 1, 2, 5, 4], [6, 1, 3, 2, 5, 4], [6, 2, 1, 3, 5, 4], [6, 1, 2, 3, 5, 4], [6, 2, 1, 5, 4, 3], [6, 1, 2, 5, 4, 3], [6, 2, 1, 5, 3, 4], [6, 1, 2, 5, 3, 4], [6, 1, 5, 4, 3, 2], [6, 1, 5, 4, 2, 3], [6, 1, 5, 2, 4, 3], [6, 1, 5, 3, 2, 4], [6, 1, 5, 2, 3, 4], [6, 5, 3, 2, 1, 4], [6, 5, 3, 1, 2, 4], [6, 5, 1, 3, 2, 4], [6, 5, 2, 1, 3, 4], [6, 5, 1, 2, 3, 4], [6, 5, 2, 1, 4, 3], [6, 5, 1, 2, 4, 3], [6, 5, 1, 4, 3, 2], [6, 5, 1, 4, 2, 3], [6, 5, 4, 3, 2, 1], [6, 5, 4, 3, 1, 2], [6, 5, 4, 1, 3, 2], [6, 5, 4, 2, 1, 3], [6, 5, 4, 1, 2, 3]] [[(1, 3), (2,), (4,), (5,), (6,)], [(1, 3, 2), (4,), (5,), (6,)], [(1,), (2, 3), (4,), (5,), (6,)], [(1, 2), (3,), (4,), (5,), (6,)], [(1,), (2,), (3,), (4,), (5,), (6,)], [(1, 2), (3, 4), (5,), (6,)], [(1,), (2,), (3, 4), (5,), (6,)], [(1,), (2, 4), (3,), (5,), (6,)], [(1,), (2, 4, 3), (5,), (6,)], [(1, 4), (2, 3), (5,), (6,)], [(1, 4, 2, 3), (5,), (6,)], [(1, 4, 2), (3,), (5,), (6,)], [(1, 4, 3), (2,), (5,), (6,)], [(1, 4, 3, 2), (5,), (6,)], [(1, 3), (2,), (4, 5), (6,)], [(1, 3, 2), (4, 5), (6,)], [(1,), (2, 3), (4, 5), (6,)], [(1, 2), (3,), (4, 5), (6,)], [(1,), (2,), (3,), (4, 5), (6,)], [(1, 2), (3, 5), (4,), (6,)], [(1,), (2,), (3, 5), (4,), (6,)], [(1, 2), (3, 5, 4), (6,)], [(1,), (2,), (3, 5, 4), (6,)], [(1,), (2, 5), (3, 4), (6,)], [(1,), (2, 5, 3, 4), (6,)], [(1,), (2, 5, 3), (4,), (6,)], [(1,), (2, 5, 4), (3,), (6,)], [(1,), (2, 5, 4, 3), (6,)], [(1, 5, 4), (2, 3), (6,)], [(1, 5, 4, 2, 3), (6,)], [(1, 5, 4, 2), (3,), (6,)], [(1, 5, 4, 3), (2,), (6,)], [(1, 5, 4, 3, 2), (6,)], [(1, 5, 3), (2,), (4,), (6,)], [(1, 5, 3, 2), (4,), (6,)], [(1, 5, 2), (3, 4), (6,)], [(1, 5, 3, 4, 2), (6,)], [(1, 5), (2, 4), (3,), (6,)], [(1, 5, 2, 4), (3,), (6,)], [(1, 5, 2, 4, 3), (6,)], [(1, 5, 3, 2, 4), (6,)], [(1, 5, 3), (2, 4), (6,)], [(1, 3), (2,), (4,), (5, 6)], [(1, 3, 2), (4,), (5, 6)], [(1,), (2, 3), (4,), (5, 6)], [(1, 2), (3,), (4,), (5, 6)], [(1,), (2,), (3,), (4,), (5, 6)], [(1, 2), (3, 4), (5, 6)], [(1,), (2,), (3, 4), (5, 6)], [(1,), (2, 4), (3,), (5, 6)], [(1,), (2, 4, 3), (5, 6)], [(1, 4), (2, 3), (5, 6)], [(1, 4, 2, 3), (5, 6)], [(1, 4, 2), (3,), (5, 6)], [(1, 4, 3), (2,), (5, 6)], [(1, 4, 3, 2), (5, 6)], [(1, 3), (2,), (4, 6), (5,)], [(1, 3, 2), (4, 6), (5,)], [(1,), (2, 3), (4, 6), (5,)], [(1, 2), (3,), (4, 6), (5,)], [(1,), (2,), (3,), (4, 6), (5,)], [(1, 3), (2,), (4, 6, 5)], [(1, 3, 2), (4, 6, 5)], [(1,), (2, 3), (4, 6, 5)], [(1, 2), (3,), (4, 6, 5)], [(1,), (2,), (3,), (4, 6, 5)], [(1, 2), (3, 6), (4, 5)], [(1,), (2,), (3, 6), (4, 5)], [(1, 2), (3, 6, 4, 5)], [(1,), (2,), (3, 6, 4, 5)], [(1, 2), (3, 6, 4), (5,)], [(1,), (2,), (3, 6, 4), (5,)], [(1, 2), (3, 6, 5), (4,)], [(1,), (2,), (3, 6, 5), (4,)], [(1, 2), (3, 6, 5, 4)], [(1,), (2,), (3, 6, 5, 4)], [(1,), (2, 6, 5), (3, 4)], [(1,), (2, 6, 5, 3, 4)], [(1,), (2, 6, 5, 3), (4,)], [(1,), (2, 6, 5, 4), (3,)], [(1,), (2, 6, 5, 4, 3)], [(1,), (2, 6, 4), (3,), (5,)], [(1,), (2, 6, 4, 3), (5,)], [(1,), (2, 6, 3), (4, 5)], [(1,), (2, 6, 4, 5, 3)], [(1,), (2, 6), (3, 5), (4,)], [(1,), (2, 6, 3, 5), (4,)], [(1,), (2, 6, 3, 5, 4)], [(1,), (2, 6, 4, 3, 5)], [(1,), (2, 6, 4), (3, 5)], [(1, 6, 5, 4), (2, 3)], [(1, 6, 5, 4, 2, 3)], [(1, 6, 5, 4, 2), (3,)], [(1, 6, 5, 4, 3), (2,)], [(1, 6, 5, 4, 3, 2)], [(1, 6, 5, 3), (2,), (4,)], [(1, 6, 5, 3, 2), (4,)], [(1, 6, 5, 2), (3, 4)], [(1, 6, 5, 3, 4, 2)], [(1, 6, 5), (2, 4), (3,)], [(1, 6, 5, 2, 4), (3,)], [(1, 6, 5, 2, 4, 3)], [(1, 6, 5, 3, 2, 4)], [(1, 6, 5, 3), (2, 4)], [(1, 6, 4), (2, 3), (5,)], [(1, 6, 4, 2, 3), (5,)], [(1, 6, 4, 2), (3,), (5,)], [(1, 6, 4, 3), (2,), (5,)], [(1, 6, 4, 3, 2), (5,)], [(1, 6, 3), (2,), (4, 5)], [(1, 6, 3, 2), (4, 5)], [(1, 6, 4, 5, 3), (2,)], [(1, 6, 4, 5, 3, 2)], [(1, 6, 2), (3, 5), (4,)], [(1, 6, 3, 5, 2), (4,)], [(1, 6, 3, 5, 4, 2)], [(1, 6, 4, 3, 5, 2)], [(1, 6, 4, 2), (3, 5)], [(1, 6, 4, 2, 5), (3,)], [(1, 6, 4), (2, 5), (3,)], [(1, 6, 4, 3), (2, 5)], [(1, 6, 4), (2, 5, 3)], [(1, 6, 4, 2, 5, 3)], [(1, 6, 3, 2, 5, 4)], [(1, 6, 3), (2, 5, 4)], [(1, 6, 2, 5, 3), (4,)], [(1, 6, 3), (2, 5), (4,)], [(1, 6), (2, 5), (3, 4)], [(1, 6, 2, 5), (3, 4)], [(1, 6, 2, 5, 3, 4)], [(1, 6, 3, 4, 2, 5)], [(1, 6, 3, 4), (2, 5)]] [[(1, 6, 5, 4, 2, 3)], [(1, 6, 5, 4, 3, 2)], [(1, 6, 5, 3, 4, 2)], [(1, 6, 5, 2, 4, 3)], [(1, 6, 5, 3, 2, 4)], [(1, 6, 4, 5, 3, 2)], [(1, 6, 3, 5, 4, 2)], [(1, 6, 4, 3, 5, 2)], [(1, 6, 4, 2, 5, 3)], [(1, 6, 3, 2, 5, 4)], [(1, 6, 2, 5, 3, 4)], [(1, 6, 3, 4, 2, 5)]] 12
Error in lines 18-19 Traceback (most recent call last): File "/projects/sage/sage-7.3/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 976, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 2, in <module> IndexError: list index out of range
D=[]
d=[]
for j in [0..len(cycles)-1]:
d.append(Permutation([cycles[j][0]]).inversions())
for k in [0..len(d)-1]:
D.append(len(d[k]))
print D
len(D)

[7, 5, 7, 9, 9, 7, 9, 9, 9, 11, 13, 13] 12


N=[[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]
for i in [0..len(B)-1]:
for j in [0..n-1]:
N[i].append(B[i][0][j])
print N

d=[]
D=[]
L=[]
for j in [0..len(N)-1]:
d.append(Permutation(N[j]).inversions())
for k in [0..len(d)-1]:
D.append(len(d[k]))
print D
len(D)

[[1, 7, 5, 2, 6, 4, 3], [1, 7, 5, 3, 2, 6, 4], [1, 7, 5, 4, 2, 6, 3], [1, 7, 5, 2, 6, 3, 4], [1, 7, 4, 2, 6, 5, 3], [1, 7, 4, 5, 2, 6, 3], [1, 7, 4, 3, 5, 2, 6], [1, 7, 4, 2, 6, 3, 5], [1, 7, 3, 5, 2, 6, 4], [1, 7, 2, 6, 3, 5, 4], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []] [11, 10, 11, 10, 10, 10, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 33
n=7
P=Permutations(n, avoiding=[2,3,1])
Q=[]

D=[]
d=[]
for j in [0..len(P)-1]:
if P[j][0]==n:
Q.append(P[j].to_cycles())
d.append(P[j].inversions())
for k in [0..len(d)-1]:
D.append(len(d[k]))
print Q
print D
len(Q)
len(D)

[[(1, 7, 6, 5, 4), (2, 3)], [(1, 7, 6, 5, 4, 2, 3)], [(1, 7, 6, 5, 4, 2), (3,)], [(1, 7, 6, 5, 4, 3), (2,)], [(1, 7, 6, 5, 4, 3, 2)], [(1, 7, 6, 5, 3), (2,), (4,)], [(1, 7, 6, 5, 3, 2), (4,)], [(1, 7, 6, 5, 2), (3, 4)], [(1, 7, 6, 5, 3, 4, 2)], [(1, 7, 6, 5), (2, 4), (3,)], [(1, 7, 6, 5, 2, 4), (3,)], [(1, 7, 6, 5, 2, 4, 3)], [(1, 7, 6, 5, 3, 2, 4)], [(1, 7, 6, 5, 3), (2, 4)], [(1, 7, 6, 4), (2, 3), (5,)], [(1, 7, 6, 4, 2, 3), (5,)], [(1, 7, 6, 4, 2), (3,), (5,)], [(1, 7, 6, 4, 3), (2,), (5,)], [(1, 7, 6, 4, 3, 2), (5,)], [(1, 7, 6, 3), (2,), (4, 5)], [(1, 7, 6, 3, 2), (4, 5)], [(1, 7, 6, 4, 5, 3), (2,)], [(1, 7, 6, 4, 5, 3, 2)], [(1, 7, 6, 2), (3, 5), (4,)], [(1, 7, 6, 3, 5, 2), (4,)], [(1, 7, 6, 3, 5, 4, 2)], [(1, 7, 6, 4, 3, 5, 2)], [(1, 7, 6, 4, 2), (3, 5)], [(1, 7, 6, 4, 2, 5), (3,)], [(1, 7, 6, 4), (2, 5), (3,)], [(1, 7, 6, 4, 3), (2, 5)], [(1, 7, 6, 4), (2, 5, 3)], [(1, 7, 6, 4, 2, 5, 3)], [(1, 7, 6, 3, 2, 5, 4)], [(1, 7, 6, 3), (2, 5, 4)], [(1, 7, 6, 2, 5, 3), (4,)], [(1, 7, 6, 3), (2, 5), (4,)], [(1, 7, 6), (2, 5), (3, 4)], [(1, 7, 6, 2, 5), (3, 4)], [(1, 7, 6, 2, 5, 3, 4)], [(1, 7, 6, 3, 4, 2, 5)], [(1, 7, 6, 3, 4), (2, 5)], [(1, 7, 5, 4), (2, 3), (6,)], [(1, 7, 5, 4, 2, 3), (6,)], [(1, 7, 5, 4, 2), (3,), (6,)], [(1, 7, 5, 4, 3), (2,), (6,)], [(1, 7, 5, 4, 3, 2), (6,)], [(1, 7, 5, 3), (2,), (4,), (6,)], [(1, 7, 5, 3, 2), (4,), (6,)], [(1, 7, 5, 2), (3, 4), (6,)], [(1, 7, 5, 3, 4, 2), (6,)], [(1, 7, 5), (2, 4), (3,), (6,)], [(1, 7, 5, 2, 4), (3,), (6,)], [(1, 7, 5, 2, 4, 3), (6,)], [(1, 7, 5, 3, 2, 4), (6,)], [(1, 7, 5, 3), (2, 4), (6,)], [(1, 7, 4), (2, 3), (5, 6)], [(1, 7, 4, 2, 3), (5, 6)], [(1, 7, 4, 2), (3,), (5, 6)], [(1, 7, 4, 3), (2,), (5, 6)], [(1, 7, 4, 3, 2), (5, 6)], [(1, 7, 5, 6, 4), (2, 3)], [(1, 7, 5, 6, 4, 2, 3)], [(1, 7, 5, 6, 4, 2), (3,)], [(1, 7, 5, 6, 4, 3), (2,)], [(1, 7, 5, 6, 4, 3, 2)], [(1, 7, 3), (2,), (4, 6), (5,)], [(1, 7, 3, 2), (4, 6), (5,)], [(1, 7, 4, 6, 3), (2,), (5,)], [(1, 7, 4, 6, 3, 2), (5,)], [(1, 7, 4, 6, 5, 3), (2,)], [(1, 7, 4, 6, 5, 3, 2)], [(1, 7, 5, 4, 6, 3), (2,)], [(1, 7, 5, 4, 6, 3, 2)], [(1, 7, 5, 3), (2,), (4, 6)], [(1, 7, 5, 3, 2), (4, 6)], [(1, 7, 5, 3, 6, 2), (4,)], [(1, 7, 5, 2), (3, 6), (4,)], [(1, 7, 5, 4, 2), (3, 6)], [(1, 7, 5, 2), (3, 6, 4)], [(1, 7, 5, 3, 6, 4, 2)], [(1, 7, 4, 3, 6, 5, 2)], [(1, 7, 4, 2), (3, 6, 5)], [(1, 7, 3, 6, 4, 2), (5,)], [(1, 7, 4, 2), (3, 6), (5,)], [(1, 7, 2), (3, 6), (4, 5)], [(1, 7, 3, 6, 2), (4, 5)], [(1, 7, 3, 6, 4, 5, 2)], [(1, 7, 4, 5, 3, 6, 2)], [(1, 7, 4, 5, 2), (3, 6)], [(1, 7, 5), (2, 6, 4), (3,)], [(1, 7, 5, 2, 6, 4), (3,)], [(1, 7, 5, 2, 6, 4, 3)], [(1, 7, 5, 3, 2, 6, 4)], [(1, 7, 5, 3), (2, 6, 4)], [(1, 7, 5, 4), (2, 6, 3)], [(1, 7, 5, 4, 2, 6, 3)], [(1, 7, 5, 3), (2, 6), (4,)], [(1, 7, 5, 2, 6, 3), (4,)], [(1, 7, 5, 2, 6), (3, 4)], [(1, 7, 5), (2, 6), (3, 4)], [(1, 7, 5, 3, 4), (2, 6)], [(1, 7, 5), (2, 6, 3, 4)], [(1, 7, 5, 2, 6, 3, 4)], [(1, 7, 4, 2, 6, 5), (3,)], [(1, 7, 4), (2, 6, 5), (3,)], [(1, 7, 4, 3), (2, 6, 5)], [(1, 7, 4), (2, 6, 5, 3)], [(1, 7, 4, 2, 6, 5, 3)], [(1, 7, 3, 2, 6, 4), (5,)], [(1, 7, 3), (2, 6, 4), (5,)], [(1, 7, 4), (2, 6, 3), (5,)], [(1, 7, 4, 2, 6, 3), (5,)], [(1, 7, 2, 6, 3), (4, 5)], [(1, 7, 3), (2, 6), (4, 5)], [(1, 7, 3), (2, 6, 4, 5)], [(1, 7, 4, 5, 3), (2, 6)], [(1, 7, 4, 5, 2, 6, 3)], [(1, 7, 4, 3, 5, 2, 6)], [(1, 7, 4, 3, 5), (2, 6)], [(1, 7, 4), (2, 6), (3, 5)], [(1, 7, 4, 2, 6, 3, 5)], [(1, 7, 4), (2, 6, 3, 5)], [(1, 7, 3, 5), (2, 6, 4)], [(1, 7, 3, 5, 2, 6, 4)], [(1, 7, 2, 6, 3, 5, 4)], [(1, 7, 3, 5, 4), (2, 6)], [(1, 7), (2, 6), (3, 5), (4,)], [(1, 7, 2, 6), (3, 5), (4,)], [(1, 7, 2, 6, 3, 5), (4,)], [(1, 7, 3, 5, 2, 6), (4,)], [(1, 7, 3, 5), (2, 6), (4,)]] [9, 8, 7, 7, 6, 8, 7, 9, 8, 12, 11, 10, 10, 9, 10, 9, 8, 8, 7, 10, 9, 9, 8, 12, 11, 10, 10, 9, 13, 12, 11, 11, 10, 12, 11, 13, 12, 16, 15, 14, 14, 13, 10, 9, 8, 8, 7, 9, 8, 10, 9, 13, 12, 11, 11, 10, 12, 11, 10, 10, 9, 11, 10, 9, 9, 8, 13, 12, 12, 11, 11, 10, 11, 10, 10, 9, 13, 12, 11, 11, 10, 12, 11, 13, 12, 16, 15, 14, 14, 13, 14, 13, 12, 12, 11, 13, 12, 14, 13, 17, 16, 15, 15, 14, 15, 14, 13, 13, 12, 15, 14, 14, 13, 17, 16, 15, 15, 14, 18, 17, 16, 16, 15, 17, 16, 18, 17, 21, 20, 19, 19, 18] 132 132
O=[]
E=[]
p=[]
for i in [0..len(D)-1]:
if D[i]%2==0:
E.append(d[i])
p.append(Q[i])

else:
O.append(d[i])

len(E)
len(O)
print p

66 66 [[(1, 7, 6, 5, 4, 2, 3)], [(1, 7, 6, 5, 4, 3, 2)], [(1, 7, 6, 5, 3), (2,), (4,)], [(1, 7, 6, 5, 3, 4, 2)], [(1, 7, 6, 5), (2, 4), (3,)], [(1, 7, 6, 5, 2, 4, 3)], [(1, 7, 6, 5, 3, 2, 4)], [(1, 7, 6, 4), (2, 3), (5,)], [(1, 7, 6, 4, 2), (3,), (5,)], [(1, 7, 6, 4, 3), (2,), (5,)], [(1, 7, 6, 3), (2,), (4, 5)], [(1, 7, 6, 4, 5, 3, 2)], [(1, 7, 6, 2), (3, 5), (4,)], [(1, 7, 6, 3, 5, 4, 2)], [(1, 7, 6, 4, 3, 5, 2)], [(1, 7, 6, 4), (2, 5), (3,)], [(1, 7, 6, 4, 2, 5, 3)], [(1, 7, 6, 3, 2, 5, 4)], [(1, 7, 6, 3), (2, 5), (4,)], [(1, 7, 6), (2, 5), (3, 4)], [(1, 7, 6, 2, 5, 3, 4)], [(1, 7, 6, 3, 4, 2, 5)], [(1, 7, 5, 4), (2, 3), (6,)], [(1, 7, 5, 4, 2), (3,), (6,)], [(1, 7, 5, 4, 3), (2,), (6,)], [(1, 7, 5, 3, 2), (4,), (6,)], [(1, 7, 5, 2), (3, 4), (6,)], [(1, 7, 5, 2, 4), (3,), (6,)], [(1, 7, 5, 3), (2, 4), (6,)], [(1, 7, 4), (2, 3), (5, 6)], [(1, 7, 4, 2), (3,), (5, 6)], [(1, 7, 4, 3), (2,), (5, 6)], [(1, 7, 5, 6, 4, 2, 3)], [(1, 7, 5, 6, 4, 3, 2)], [(1, 7, 3, 2), (4, 6), (5,)], [(1, 7, 4, 6, 3), (2,), (5,)], [(1, 7, 4, 6, 5, 3, 2)], [(1, 7, 5, 4, 6, 3, 2)], [(1, 7, 5, 3), (2,), (4, 6)], [(1, 7, 5, 2), (3, 6), (4,)], [(1, 7, 5, 3, 6, 4, 2)], [(1, 7, 4, 3, 6, 5, 2)], [(1, 7, 4, 2), (3, 6), (5,)], [(1, 7, 2), (3, 6), (4, 5)], [(1, 7, 3, 6, 4, 5, 2)], [(1, 7, 4, 5, 3, 6, 2)], [(1, 7, 5), (2, 6, 4), (3,)], [(1, 7, 5, 2, 6, 4, 3)], [(1, 7, 5, 3, 2, 6, 4)], [(1, 7, 5, 4, 2, 6, 3)], [(1, 7, 5, 3), (2, 6), (4,)], [(1, 7, 5), (2, 6), (3, 4)], [(1, 7, 5, 2, 6, 3, 4)], [(1, 7, 4), (2, 6, 5), (3,)], [(1, 7, 4, 2, 6, 5, 3)], [(1, 7, 3), (2, 6, 4), (5,)], [(1, 7, 4), (2, 6, 3), (5,)], [(1, 7, 3), (2, 6), (4, 5)], [(1, 7, 4, 5, 2, 6, 3)], [(1, 7, 4, 3, 5, 2, 6)], [(1, 7, 4), (2, 6), (3, 5)], [(1, 7, 4, 2, 6, 3, 5)], [(1, 7, 3, 5, 2, 6, 4)], [(1, 7, 2, 6, 3, 5, 4)], [(1, 7, 2, 6), (3, 5), (4,)], [(1, 7, 3, 5), (2, 6), (4,)]]
︠61e339f7-7847-4697-9050-9f703603966d︠