Gray Code is a binary numeral system where two successive values differ in only one bit. The n-bit-width gray code is the sequence consisting of numbers between 0 and 2^n-1.
For example, 2-bit-width gray code is the sequence of {00, 01, 11, 10}. 3-bit-width gray code is the sequence of {000, 001, 011, 010, 110, 111, 101, 100}.
Now, we want you to construct the n-bit-width gray code by using the following algorithm.
The input includes multiple test cases.
In each test case, the first line contains one integer n.
1 ≤ n ≤ 11
The multiply lines contains 2^n integers, which indicate the n-bit-width gray code.