I am trying to create a list of list containing all possible permutations of int 1~6. What I hope to get is [[1,2,3,4,5,6], [1,2,3,4,6,5].....] but keep getting tuples. Is there any elegant way for doing following code?
n=6
numberPool = []
for i in range(1, n+1):
numberPool.append(i)
nutPool = list(permutations(numberPool))
# change to list from tuple
temp = []
for i in nutPool:
temp.append(list(i))
nutPool = temp
Simply, you can use a comprehension to change each tuple to a list:
nutPool = [list(perm) for perm in permutations(numberPool)]
which is essentially condensing these five lines in your question into a single expression:
nutPool = list(permutations(numberPool))
temp = []
for i in nutPool:
temp.append(list(i))
nutPool = temp
You can use a list comprehension directly on permutations:
from itertools import permutations
n=6
numberPool = []
for i in range(1, n+1):
numberPool.append(i)
nutPool = [list(perm) for perm in permutations(numberPool)]
print(nutPool)
#[[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 6, 5], [1, 2, 3, 5, 4, 6], [1, 2, 3, 5, 6, 4], [1, 2, 3, 6, 4, 5], [1, 2, 3, 6, 5, 4], [1, 2, 4, 3, 5, 6], [1, 2, 4, 3, 6, 5], [1, 2, 4, 5, 3, 6], [1, 2, 4, 5, 6, 3], [1, 2, 4, 6, 3, 5], [1, 2, 4, 6, 5, 3], [1, 2, 5, 3, 4, 6], [1, 2, 5, 3, 6, 4], [1, 2, 5, 4, 3, 6], [1, 2, 5, 4, 6, 3], [1, 2, 5, 6, 3, 4], [1, 2, 5, 6, 4, 3], [1, 2, 6, 3, 4, 5], [1, 2, 6, 3, 5, 4], [1, 2, 6, 4, 3, 5], [1, 2, 6, 4, 5, 3], [1, 2, 6, 5, 3, 4], [1, 2, 6, 5, 4, 3], [1, 3, 2, 4, 5, 6], [1, 3, 2, 4, 6, 5], [1, 3, 2, 5, 4, 6], [1, 3, 2, 5, 6, 4], [1, 3, 2, 6, 4, 5], [1, 3, 2, 6, 5, 4], [1, 3, 4, 2, 5, 6], [1, 3, 4, 2, 6, 5], [1, 3, 4, 5, 2, 6], [1, 3, 4, 5, 6, 2], [1, 3, 4, 6, 2, 5], [1, 3, 4, 6, 5, 2], [1, 3, 5, 2, 4, 6], [1, 3, 5, 2, 6, 4], [1, 3, 5, 4, 2, 6], [1, 3, 5, 4, 6, 2], [1, 3, 5, 6, 2, 4], [1, 3, 5, 6, 4, 2], [1, 3, 6, 2, 4, 5], [1, 3, 6, 2, 5, 4], [1, 3, 6, 4, 2, 5], [1, 3, 6, 4, 5, 2], [1, 3, 6, 5, 2, 4], [1, 3, 6, 5, 4, 2], [1, 4, 2, 3, 5, 6], [1, 4, 2, 3, 6, 5], [1, 4, 2, 5, 3, 6], [1, 4, 2, 5, 6, 3], [1, 4, 2, 6, 3, 5], [1, 4, 2, 6, 5, 3], [1, 4, 3, 2, 5, 6], [1, 4, 3, 2, 6, 5], [1, 4, 3, 5, 2, 6], [1, 4, 3, 5, 6, 2], [1, 4, 3, 6, 2, 5], [1, 4, 3, 6, 5, 2], [1, 4, 5, 2, 3, 6], [1, 4, 5, 2, 6, 3], [1, 4, 5, 3, 2, 6], [1, 4, 5, 3, 6, 2], [1, 4, 5, 6, 2, 3], [1, 4, 5, 6, 3, 2], [1, 4, 6, 2, 3, 5], [1, 4, 6, 2, 5, 3], [1, 4, 6, 3, 2, 5], [1, 4, 6, 3, 5, 2], [1, 4, 6, 5, 2, 3], [1, 4, 6, 5, 3, 2], [1, 5, 2, 3, 4, 6], [1, 5, 2, 3, 6, 4], [1, 5, 2, 4, 3, 6], [1, 5, 2, 4, 6, 3], [1, 5, 2, 6, 3, 4], [1, 5, 2, 6, 4, 3], [1, 5, 3, 2, 4, 6], [1, 5, 3, 2, 6, 4], [1, 5, 3, 4, 2, 6], [1, 5, 3, 4, 6, 2], [1, 5, 3, 6, 2, 4], [1, 5, 3, 6, 4, 2], [1, 5, 4, 2, 3, 6], [1, 5, 4, 2, 6, 3], [1, 5, 4, 3, 2, 6], [1, 5, 4, 3, 6, 2], [1, 5, 4, 6, 2, 3], [1, 5, 4, 6, 3, 2], [1, 5, 6, 2, 3, 4], [1, 5, 6, 2, 4, 3], [1, 5, 6, 3, 2, 4], [1, 5, 6, 3, 4, 2], [1, 5, 6, 4, 2, 3], [1, 5, 6, 4, 3, 2], [1, 6, 2, 3, 4, 5], [1, 6, 2, 3, 5, 4], [1, 6, 2, 4, 3, 5], [1, 6, 2, 4, 5, 3], [1, 6, 2, 5, 3, 4], [1, 6, 2, 5, 4, 3], [1, 6, 3, 2, 4, 5], [1, 6, 3, 2, 5, 4], [1, 6, 3, 4, 2, 5], [1, 6, 3, 4, 5, 2], [1, 6, 3, 5, 2, 4], [1, 6, 3, 5, 4, 2], [1, 6, 4, 2, 3, 5], [1, 6, 4, 2, 5, 3], [1, 6, 4, 3, 2, 5], [1, 6, 4, 3, 5, 2], [1, 6, 4, 5, 2, 3], [1, 6, 4, 5, 3, 2], [1, 6, 5, 2, 3, 4], [1, 6, 5, 2, 4, 3], [1, 6, 5, 3, 2, 4], [1, 6, 5, 3, 4, 2], [1, 6, 5, 4, 2, 3], [1, 6, 5, 4, 3, 2], [2, 1, 3, 4, 5, 6], [2, 1, 3, 4, 6, 5], [2, 1, 3, 5, 4, 6], [2, 1, 3, 5, 6, 4], [2, 1, 3, 6, 4, 5], [2, 1, 3, 6, 5, 4], [2, 1, 4, 3, 5, 6], [2, 1, 4, 3, 6, 5], [2, 1, 4, 5, 3, 6], [2, 1, 4, 5, 6, 3], [2, 1, 4, 6, 3, 5], [2, 1, 4, 6, 5, 3], [2, 1, 5, 3, 4, 6], [2, 1, 5, 3, 6, 4], [2, 1, 5, 4, 3, 6], [2, 1, 5, 4, 6, 3], [2, 1, 5, 6, 3, 4], [2, 1, 5, 6, 4, 3], [2, 1, 6, 3, 4, 5], [2, 1, 6, 3, 5, 4], [2, 1, 6, 4, 3, 5], [2, 1, 6, 4, 5, 3], [2, 1, 6, 5, 3, 4], [2, 1, 6, 5, 4, 3], [2, 3, 1, 4, 5, 6], [2, 3, 1, 4, 6, 5], [2, 3, 1, 5, 4, 6], [2, 3, 1, 5, 6, 4], [2, 3, 1, 6, 4, 5], [2, 3, 1, 6, 5, 4], [2, 3, 4, 1, 5, 6], [2, 3, 4, 1, 6, 5], [2, 3, 4, 5, 1, 6], [2, 3, 4, 5, 6, 1], [2, 3, 4, 6, 1, 5], [2, 3, 4, 6, 5, 1], [2, 3, 5, 1, 4, 6], [2, 3, 5, 1, 6, 4], [2, 3, 5, 4, 1, 6], [2, 3, 5, 4, 6, 1], [2, 3, 5, 6, 1, 4], [2, 3, 5, 6, 4, 1], [2, 3, 6, 1, 4, 5], [2, 3, 6, 1, 5, 4], [2, 3, 6, 4, 1, 5], [2, 3, 6, 4, 5, 1], [2, 3, 6, 5, 1, 4], [2, 3, 6, 5, 4, 1], [2, 4, 1, 3, 5, 6], [2, 4, 1, 3, 6, 5], [2, 4, 1, 5, 3, 6], [2, 4, 1, 5, 6, 3], [2, 4, 1, 6, 3, 5], [2, 4, 1, 6, 5, 3], [2, 4, 3, 1, 5, 6], [2, 4, 3, 1, 6, 5], [2, 4, 3, 5, 1, 6], [2, 4, 3, 5, 6, 1], [2, 4, 3, 6, 1, 5], [2, 4, 3, 6, 5, 1], [2, 4, 5, 1, 3, 6], [2, 4, 5, 1, 6, 3], [2, 4, 5, 3, 1, 6], [2, 4, 5, 3, 6, 1], [2, 4, 5, 6, 1, 3], [2, 4, 5, 6, 3, 1], [2, 4, 6, 1, 3, 5], [2, 4, 6, 1, 5, 3], [2, 4, 6, 3, 1, 5], [2, 4, 6, 3, 5, 1], [2, 4, 6, 5, 1, 3], [2, 4, 6, 5, 3, 1], [2, 5, 1, 3, 4, 6], [2, 5, 1, 3, 6, 4], [2, 5, 1, 4, 3, 6], [2, 5, 1, 4, 6, 3], [2, 5, 1, 6, 3, 4], [2, 5, 1, 6, 4, 3], [2, 5, 3, 1, 4, 6], [2, 5, 3, 1, 6, 4], [2, 5, 3, 4, 1, 6], [2, 5, 3, 4, 6, 1], [2, 5, 3, 6, 1, 4], [2, 5, 3, 6, 4, 1], [2, 5, 4, 1, 3, 6], [2, 5, 4, 1, 6, 3], [2, 5, 4, 3, 1, 6], [2, 5, 4, 3, 6, 1], [2, 5, 4, 6, 1, 3], [2, 5, 4, 6, 3, 1], [2, 5, 6, 1, 3, 4], [2, 5, 6, 1, 4, 3], [2, 5, 6, 3, 1, 4], [2, 5, 6, 3, 4, 1], [2, 5, 6, 4, 1, 3], [2, 5, 6, 4, 3, 1], [2, 6, 1, 3, 4, 5], [2, 6, 1, 3, 5, 4], [2, 6, 1, 4, 3, 5], [2, 6, 1, 4, 5, 3], [2, 6, 1, 5, 3, 4], [2, 6, 1, 5, 4, 3], [2, 6, 3, 1, 4, 5], [2, 6, 3, 1, 5, 4], [2, 6, 3, 4, 1, 5], [2, 6, 3, 4, 5, 1], [2, 6, 3, 5, 1, 4], [2, 6, 3, 5, 4, 1], [2, 6, 4, 1, 3, 5], [2, 6, 4, 1, 5, 3], [2, 6, 4, 3, 1, 5], [2, 6, 4, 3, 5, 1], [2, 6, 4, 5, 1, 3], [2, 6, 4, 5, 3, 1], [2, 6, 5, 1, 3, 4], [2, 6, 5, 1, 4, 3], [2, 6, 5, 3, 1, 4], [2, 6, 5, 3, 4, 1], [2, 6, 5, 4, 1, 3], [2, 6, 5, 4, 3, 1], [3, 1, 2, 4, 5, 6], [3, 1, 2, 4, 6, 5], [3, 1, 2, 5, 4, 6], [3, 1, 2, 5, 6, 4], [3, 1, 2, 6, 4, 5], [3, 1, 2, 6, 5, 4], [3, 1, 4, 2, 5, 6], [3, 1, 4, 2, 6, 5], [3, 1, 4, 5, 2, 6], [3, 1, 4, 5, 6, 2], [3, 1, 4, 6, 2, 5], [3, 1, 4, 6, 5, 2], [3, 1, 5, 2, 4, 6], [3, 1, 5, 2, 6, 4], [3, 1, 5, 4, 2, 6], [3, 1, 5, 4, 6, 2], [3, 1, 5, 6, 2, 4], [3, 1, 5, 6, 4, 2], [3, 1, 6, 2, 4, 5], [3, 1, 6, 2, 5, 4], [3, 1, 6, 4, 2, 5], [3, 1, 6, 4, 5, 2], [3, 1, 6, 5, 2, 4], [3, 1, 6, 5, 4, 2], [3, 2, 1, 4, 5, 6], [3, 2, 1, 4, 6, 5], [3, 2, 1, 5, 4, 6], [3, 2, 1, 5, 6, 4], [3, 2, 1, 6, 4, 5], [3, 2, 1, 6, 5, 4], [3, 2, 4, 1, 5, 6], [3, 2, 4, 1, 6, 5], [3, 2, 4, 5, 1, 6], [3, 2, 4, 5, 6, 1], [3, 2, 4, 6, 1, 5], [3, 2, 4, 6, 5, 1], [3, 2, 5, 1, 4, 6], [3, 2, 5, 1, 6, 4], [3, 2, 5, 4, 1, 6], [3, 2, 5, 4, 6, 1], [3, 2, 5, 6, 1, 4], [3, 2, 5, 6, 4, 1], [3, 2, 6, 1, 4, 5], [3, 2, 6, 1, 5, 4], [3, 2, 6, 4, 1, 5], [3, 2, 6, 4, 5, 1], [3, 2, 6, 5, 1, 4], [3, 2, 6, 5, 4, 1], [3, 4, 1, 2, 5, 6], [3, 4, 1, 2, 6, 5], [3, 4, 1, 5, 2, 6], [3, 4, 1, 5, 6, 2], [3, 4, 1, 6, 2, 5], [3, 4, 1, 6, 5, 2], [3, 4, 2, 1, 5, 6], [3, 4, 2, 1, 6, 5], [3, 4, 2, 5, 1, 6], [3, 4, 2, 5, 6, 1], [3, 4, 2, 6, 1, 5], [3, 4, 2, 6, 5, 1], [3, 4, 5, 1, 2, 6], [3, 4, 5, 1, 6, 2], [3, 4, 5, 2, 1, 6], [3, 4, 5, 2, 6, 1], [3, 4, 5, 6, 1, 2], [3, 4, 5, 6, 2, 1], [3, 4, 6, 1, 2, 5], [3, 4, 6, 1, 5, 2], [3, 4, 6, 2, 1, 5], [3, 4, 6, 2, 5, 1], [3, 4, 6, 5, 1, 2], [3, 4, 6, 5, 2, 1], [3, 5, 1, 2, 4, 6], [3, 5, 1, 2, 6, 4], [3, 5, 1, 4, 2, 6], [3, 5, 1, 4, 6, 2], [3, 5, 1, 6, 2, 4], [3, 5, 1, 6, 4, 2], [3, 5, 2, 1, 4, 6], [3, 5, 2, 1, 6, 4], [3, 5, 2, 4, 1, 6], [3, 5, 2, 4, 6, 1], [3, 5, 2, 6, 1, 4], [3, 5, 2, 6, 4, 1], [3, 5, 4, 1, 2, 6], [3, 5, 4, 1, 6, 2], [3, 5, 4, 2, 1, 6], [3, 5, 4, 2, 6, 1], [3, 5, 4, 6, 1, 2], [3, 5, 4, 6, 2, 1], [3, 5, 6, 1, 2, 4], [3, 5, 6, 1, 4, 2], [3, 5, 6, 2, 1, 4], [3, 5, 6, 2, 4, 1], [3, 5, 6, 4, 1, 2], [3, 5, 6, 4, 2, 1], [3, 6, 1, 2, 4, 5], [3, 6, 1, 2, 5, 4], [3, 6, 1, 4, 2, 5], [3, 6, 1, 4, 5, 2], [3, 6, 1, 5, 2, 4], [3, 6, 1, 5, 4, 2], [3, 6, 2, 1, 4, 5], [3, 6, 2, 1, 5, 4], [3, 6, 2, 4, 1, 5], [3, 6, 2, 4, 5, 1], [3, 6, 2, 5, 1, 4], [3, 6, 2, 5, 4, 1], [3, 6, 4, 1, 2, 5], [3, 6, 4, 1, 5, 2], [3, 6, 4, 2, 1, 5], [3, 6, 4, 2, 5, 1], [3, 6, 4, 5, 1, 2], [3, 6, 4, 5, 2, 1], [3, 6, 5, 1, 2, 4], [3, 6, 5, 1, 4, 2], [3, 6, 5, 2, 1, 4], [3, 6, 5, 2, 4, 1], [3, 6, 5, 4, 1, 2], [3, 6, 5, 4, 2, 1], [4, 1, 2, 3, 5, 6], [4, 1, 2, 3, 6, 5], [4, 1, 2, 5, 3, 6], [4, 1, 2, 5, 6, 3], [4, 1, 2, 6, 3, 5], [4, 1, 2, 6, 5, 3], [4, 1, 3, 2, 5, 6], [4, 1, 3, 2, 6, 5], [4, 1, 3, 5, 2, 6], [4, 1, 3, 5, 6, 2], [4, 1, 3, 6, 2, 5], [4, 1, 3, 6, 5, 2], [4, 1, 5, 2, 3, 6], [4, 1, 5, 2, 6, 3], [4, 1, 5, 3, 2, 6], [4, 1, 5, 3, 6, 2], [4, 1, 5, 6, 2, 3], [4, 1, 5, 6, 3, 2], [4, 1, 6, 2, 3, 5], [4, 1, 6, 2, 5, 3], [4, 1, 6, 3, 2, 5], [4, 1, 6, 3, 5, 2], [4, 1, 6, 5, 2, 3], [4, 1, 6, 5, 3, 2], [4, 2, 1, 3, 5, 6], [4, 2, 1, 3, 6, 5], [4, 2, 1, 5, 3, 6], [4, 2, 1, 5, 6, 3], [4, 2, 1, 6, 3, 5], [4, 2, 1, 6, 5, 3], [4, 2, 3, 1, 5, 6], [4, 2, 3, 1, 6, 5], [4, 2, 3, 5, 1, 6], [4, 2, 3, 5, 6, 1], [4, 2, 3, 6, 1, 5], [4, 2, 3, 6, 5, 1], [4, 2, 5, 1, 3, 6], [4, 2, 5, 1, 6, 3], [4, 2, 5, 3, 1, 6], [4, 2, 5, 3, 6, 1], [4, 2, 5, 6, 1, 3], [4, 2, 5, 6, 3, 1], [4, 2, 6, 1, 3, 5], [4, 2, 6, 1, 5, 3], [4, 2, 6, 3, 1, 5], [4, 2, 6, 3, 5, 1], [4, 2, 6, 5, 1, 3], [4, 2, 6, 5, 3, 1], [4, 3, 1, 2, 5, 6], [4, 3, 1, 2, 6, 5], [4, 3, 1, 5, 2, 6], [4, 3, 1, 5, 6, 2], [4, 3, 1, 6, 2, 5], [4, 3, 1, 6, 5, 2], [4, 3, 2, 1, 5, 6], [4, 3, 2, 1, 6, 5], [4, 3, 2, 5, 1, 6], [4, 3, 2, 5, 6, 1], [4, 3, 2, 6, 1, 5], [4, 3, 2, 6, 5, 1], [4, 3, 5, 1, 2, 6], [4, 3, 5, 1, 6, 2], [4, 3, 5, 2, 1, 6], [4, 3, 5, 2, 6, 1], [4, 3, 5, 6, 1, 2], [4, 3, 5, 6, 2, 1], [4, 3, 6, 1, 2, 5], [4, 3, 6, 1, 5, 2], [4, 3, 6, 2, 1, 5], [4, 3, 6, 2, 5, 1], [4, 3, 6, 5, 1, 2], [4, 3, 6, 5, 2, 1], [4, 5, 1, 2, 3, 6], [4, 5, 1, 2, 6, 3], [4, 5, 1, 3, 2, 6], [4, 5, 1, 3, 6, 2], [4, 5, 1, 6, 2, 3], [4, 5, 1, 6, 3, 2], [4, 5, 2, 1, 3, 6], [4, 5, 2, 1, 6, 3], [4, 5, 2, 3, 1, 6], [4, 5, 2, 3, 6, 1], [4, 5, 2, 6, 1, 3], [4, 5, 2, 6, 3, 1], [4, 5, 3, 1, 2, 6], [4, 5, 3, 1, 6, 2], [4, 5, 3, 2, 1, 6], [4, 5, 3, 2, 6, 1], [4, 5, 3, 6, 1, 2], [4, 5, 3, 6, 2, 1], [4, 5, 6, 1, 2, 3], [4, 5, 6, 1, 3, 2], [4, 5, 6, 2, 1, 3], [4, 5, 6, 2, 3, 1], [4, 5, 6, 3, 1, 2], [4, 5, 6, 3, 2, 1], [4, 6, 1, 2, 3, 5], [4, 6, 1, 2, 5, 3], [4, 6, 1, 3, 2, 5], [4, 6, 1, 3, 5, 2], [4, 6, 1, 5, 2, 3], [4, 6, 1, 5, 3, 2], [4, 6, 2, 1, 3, 5], [4, 6, 2, 1, 5, 3], [4, 6, 2, 3, 1, 5], [4, 6, 2, 3, 5, 1], [4, 6, 2, 5, 1, 3], [4, 6, 2, 5, 3, 1], [4, 6, 3, 1, 2, 5], [4, 6, 3, 1, 5, 2], [4, 6, 3, 2, 1, 5], [4, 6, 3, 2, 5, 1], [4, 6, 3, 5, 1, 2], [4, 6, 3, 5, 2, 1], [4, 6, 5, 1, 2, 3], [4, 6, 5, 1, 3, 2], [4, 6, 5, 2, 1, 3], [4, 6, 5, 2, 3, 1], [4, 6, 5, 3, 1, 2], [4, 6, 5, 3, 2, 1], [5, 1, 2, 3, 4, 6], [5, 1, 2, 3, 6, 4], [5, 1, 2, 4, 3, 6], [5, 1, 2, 4, 6, 3], [5, 1, 2, 6, 3, 4], [5, 1, 2, 6, 4, 3], [5, 1, 3, 2, 4, 6], [5, 1, 3, 2, 6, 4], [5, 1, 3, 4, 2, 6], [5, 1, 3, 4, 6, 2], [5, 1, 3, 6, 2, 4], [5, 1, 3, 6, 4, 2], [5, 1, 4, 2, 3, 6], [5, 1, 4, 2, 6, 3], [5, 1, 4, 3, 2, 6], [5, 1, 4, 3, 6, 2], [5, 1, 4, 6, 2, 3], [5, 1, 4, 6, 3, 2], [5, 1, 6, 2, 3, 4], [5, 1, 6, 2, 4, 3], [5, 1, 6, 3, 2, 4], [5, 1, 6, 3, 4, 2], [5, 1, 6, 4, 2, 3], [5, 1, 6, 4, 3, 2], [5, 2, 1, 3, 4, 6], [5, 2, 1, 3, 6, 4], [5, 2, 1, 4, 3, 6], [5, 2, 1, 4, 6, 3], [5, 2, 1, 6, 3, 4], [5, 2, 1, 6, 4, 3], [5, 2, 3, 1, 4, 6], [5, 2, 3, 1, 6, 4], [5, 2, 3, 4, 1, 6], [5, 2, 3, 4, 6, 1], [5, 2, 3, 6, 1, 4], [5, 2, 3, 6, 4, 1], [5, 2, 4, 1, 3, 6], [5, 2, 4, 1, 6, 3], [5, 2, 4, 3, 1, 6], [5, 2, 4, 3, 6, 1], [5, 2, 4, 6, 1, 3], [5, 2, 4, 6, 3, 1], [5, 2, 6, 1, 3, 4], [5, 2, 6, 1, 4, 3], [5, 2, 6, 3, 1, 4], [5, 2, 6, 3, 4, 1], [5, 2, 6, 4, 1, 3], [5, 2, 6, 4, 3, 1], [5, 3, 1, 2, 4, 6], [5, 3, 1, 2, 6, 4], [5, 3, 1, 4, 2, 6], [5, 3, 1, 4, 6, 2], [5, 3, 1, 6, 2, 4], [5, 3, 1, 6, 4, 2], [5, 3, 2, 1, 4, 6], [5, 3, 2, 1, 6, 4], [5, 3, 2, 4, 1, 6], [5, 3, 2, 4, 6, 1], [5, 3, 2, 6, 1, 4], [5, 3, 2, 6, 4, 1], [5, 3, 4, 1, 2, 6], [5, 3, 4, 1, 6, 2], [5, 3, 4, 2, 1, 6], [5, 3, 4, 2, 6, 1], [5, 3, 4, 6, 1, 2], [5, 3, 4, 6, 2, 1], [5, 3, 6, 1, 2, 4], [5, 3, 6, 1, 4, 2], [5, 3, 6, 2, 1, 4], [5, 3, 6, 2, 4, 1], [5, 3, 6, 4, 1, 2], [5, 3, 6, 4, 2, 1], [5, 4, 1, 2, 3, 6], [5, 4, 1, 2, 6, 3], [5, 4, 1, 3, 2, 6], [5, 4, 1, 3, 6, 2], [5, 4, 1, 6, 2, 3], [5, 4, 1, 6, 3, 2], [5, 4, 2, 1, 3, 6], [5, 4, 2, 1, 6, 3], [5, 4, 2, 3, 1, 6], [5, 4, 2, 3, 6, 1], [5, 4, 2, 6, 1, 3], [5, 4, 2, 6, 3, 1], [5, 4, 3, 1, 2, 6], [5, 4, 3, 1, 6, 2], [5, 4, 3, 2, 1, 6], [5, 4, 3, 2, 6, 1], [5, 4, 3, 6, 1, 2], [5, 4, 3, 6, 2, 1], [5, 4, 6, 1, 2, 3], [5, 4, 6, 1, 3, 2], [5, 4, 6, 2, 1, 3], [5, 4, 6, 2, 3, 1], [5, 4, 6, 3, 1, 2], [5, 4, 6, 3, 2, 1], [5, 6, 1, 2, 3, 4], [5, 6, 1, 2, 4, 3], [5, 6, 1, 3, 2, 4], [5, 6, 1, 3, 4, 2], [5, 6, 1, 4, 2, 3], [5, 6, 1, 4, 3, 2], [5, 6, 2, 1, 3, 4], [5, 6, 2, 1, 4, 3], [5, 6, 2, 3, 1, 4], [5, 6, 2, 3, 4, 1], [5, 6, 2, 4, 1, 3], [5, 6, 2, 4, 3, 1], [5, 6, 3, 1, 2, 4], [5, 6, 3, 1, 4, 2], [5, 6, 3, 2, 1, 4], [5, 6, 3, 2, 4, 1], [5, 6, 3, 4, 1, 2], [5, 6, 3, 4, 2, 1], [5, 6, 4, 1, 2, 3], [5, 6, 4, 1, 3, 2], [5, 6, 4, 2, 1, 3], [5, 6, 4, 2, 3, 1], [5, 6, 4, 3, 1, 2], [5, 6, 4, 3, 2, 1], [6, 1, 2, 3, 4, 5], [6, 1, 2, 3, 5, 4], [6, 1, 2, 4, 3, 5], [6, 1, 2, 4, 5, 3], [6, 1, 2, 5, 3, 4], [6, 1, 2, 5, 4, 3], [6, 1, 3, 2, 4, 5], [6, 1, 3, 2, 5, 4], [6, 1, 3, 4, 2, 5], [6, 1, 3, 4, 5, 2], [6, 1, 3, 5, 2, 4], [6, 1, 3, 5, 4, 2], [6, 1, 4, 2, 3, 5], [6, 1, 4, 2, 5, 3], [6, 1, 4, 3, 2, 5], [6, 1, 4, 3, 5, 2], [6, 1, 4, 5, 2, 3], [6, 1, 4, 5, 3, 2], [6, 1, 5, 2, 3, 4], [6, 1, 5, 2, 4, 3], [6, 1, 5, 3, 2, 4], [6, 1, 5, 3, 4, 2], [6, 1, 5, 4, 2, 3], [6, 1, 5, 4, 3, 2], [6, 2, 1, 3, 4, 5], [6, 2, 1, 3, 5, 4], [6, 2, 1, 4, 3, 5], [6, 2, 1, 4, 5, 3], [6, 2, 1, 5, 3, 4], [6, 2, 1, 5, 4, 3], [6, 2, 3, 1, 4, 5], [6, 2, 3, 1, 5, 4], [6, 2, 3, 4, 1, 5], [6, 2, 3, 4, 5, 1], [6, 2, 3, 5, 1, 4], [6, 2, 3, 5, 4, 1], [6, 2, 4, 1, 3, 5], [6, 2, 4, 1, 5, 3], [6, 2, 4, 3, 1, 5], [6, 2, 4, 3, 5, 1], [6, 2, 4, 5, 1, 3], [6, 2, 4, 5, 3, 1], [6, 2, 5, 1, 3, 4], [6, 2, 5, 1, 4, 3], [6, 2, 5, 3, 1, 4], [6, 2, 5, 3, 4, 1], [6, 2, 5, 4, 1, 3], [6, 2, 5, 4, 3, 1], [6, 3, 1, 2, 4, 5], [6, 3, 1, 2, 5, 4], [6, 3, 1, 4, 2, 5], [6, 3, 1, 4, 5, 2], [6, 3, 1, 5, 2, 4], [6, 3, 1, 5, 4, 2], [6, 3, 2, 1, 4, 5], [6, 3, 2, 1, 5, 4], [6, 3, 2, 4, 1, 5], [6, 3, 2, 4, 5, 1], [6, 3, 2, 5, 1, 4], [6, 3, 2, 5, 4, 1], [6, 3, 4, 1, 2, 5], [6, 3, 4, 1, 5, 2], [6, 3, 4, 2, 1, 5], [6, 3, 4, 2, 5, 1], [6, 3, 4, 5, 1, 2], [6, 3, 4, 5, 2, 1], [6, 3, 5, 1, 2, 4], [6, 3, 5, 1, 4, 2], [6, 3, 5, 2, 1, 4], [6, 3, 5, 2, 4, 1], [6, 3, 5, 4, 1, 2], [6, 3, 5, 4, 2, 1], [6, 4, 1, 2, 3, 5], [6, 4, 1, 2, 5, 3], [6, 4, 1, 3, 2, 5], [6, 4, 1, 3, 5, 2], [6, 4, 1, 5, 2, 3], [6, 4, 1, 5, 3, 2], [6, 4, 2, 1, 3, 5], [6, 4, 2, 1, 5, 3], [6, 4, 2, 3, 1, 5], [6, 4, 2, 3, 5, 1], [6, 4, 2, 5, 1, 3], [6, 4, 2, 5, 3, 1], [6, 4, 3, 1, 2, 5], [6, 4, 3, 1, 5, 2], [6, 4, 3, 2, 1, 5], [6, 4, 3, 2, 5, 1], [6, 4, 3, 5, 1, 2], [6, 4, 3, 5, 2, 1], [6, 4, 5, 1, 2, 3], [6, 4, 5, 1, 3, 2], [6, 4, 5, 2, 1, 3], [6, 4, 5, 2, 3, 1], [6, 4, 5, 3, 1, 2], [6, 4, 5, 3, 2, 1], [6, 5, 1, 2, 3, 4], [6, 5, 1, 2, 4, 3], [6, 5, 1, 3, 2, 4], [6, 5, 1, 3, 4, 2], [6, 5, 1, 4, 2, 3], [6, 5, 1, 4, 3, 2], [6, 5, 2, 1, 3, 4], [6, 5, 2, 1, 4, 3], [6, 5, 2, 3, 1, 4], [6, 5, 2, 3, 4, 1], [6, 5, 2, 4, 1, 3], [6, 5, 2, 4, 3, 1], [6, 5, 3, 1, 2, 4], [6, 5, 3, 1, 4, 2], [6, 5, 3, 2, 1, 4], [6, 5, 3, 2, 4, 1], [6, 5, 3, 4, 1, 2], [6, 5, 3, 4, 2, 1], [6, 5, 4, 1, 2, 3], [6, 5, 4, 1, 3, 2], [6, 5, 4, 2, 1, 3], [6, 5, 4, 2, 3, 1], [6, 5, 4, 3, 1, 2], [6, 5, 4, 3, 2, 1]]