Your friend F. was given a set consisting of 2n positive integers as a gift. Considering the fact that your friend F. often takes part in football tournaments, he decided to organize a tournament for his 2n positive integers.
The numbers from the tournament are depicted below. The tournament takes place in pairs, where the higher of two numbers advances to the upper level. The levels are denoted with numbers from 0 to n, where the highest level is given with the number 0.
Since your friend F. doesn’t have time to organize all tournaments, he wants to know, for each number from the initial set, the highest level (the smallest level number) at which the number can end up in, for any permutation of the input array.
The first line contains the positive integer n(1≤n≤20).
The following line contains 2n positive integers from the interval [1;109], the elements of the set.
Print in one line 2n numbers, the labels of the highest level (the smallest level labels) at which a number can end up in, in the order the numbers were given in the input.