We all vary familar with prime numbers, now we get a integer N(1<=n <= 16), for 1 to N, your task is to write a
Cyclic
sequences a1~an, all numbers only use once, and every sum of adjacent
two numbers should be prime. No matter how you cut a circle, they're
just the same, so one circle should be print only once. For all results,
we print by lexicographical order. If there's no answer, you needn't
print anything.
Please prnit by lexicographical order.
1 2 3 4
1 4 3 2
1 4 3 2 5 6
1 6 5 2 3 4