Sanggeun is travelling in Donji Andrijevci, a town in Slovenia. The streets of the town form a complete binary tree of depth K. A complete binary tree of depth K has 2K−1 nodes. Every node carries the number of the building that stands there, and every node outside the last level has one left child and one right child.

Complete binary trees of depth 2 and depth 3
Sanggeun entered every building in the town and wrote the numbers on a sheet of paper in the order he entered them. Back in Korea he tried to draw the town, but he could not remember its shape. He did remember the order in which he walked around.
For the tree on the left in the picture Sanggeun entered the buildings in the order 2, 1, 3, and for the tree on the right the order is 1, 6, 4, 3, 5, 2, 7. Given the whole order Sanggeun wrote down, write a program that finds the building numbers on each level.
The first line contains K (1≤K≤10).
The second line contains the 2K−1 building numbers in the order Sanggeun entered them, separated by spaces. The numbers are distinct and all of them lie in the interval [1,2K).
Print the answer on K lines. On line i print the numbers of the buildings on level i from left to right, separated by single spaces.