Time limit
2s
Memory limit
256 MB
There are n lead pieces with masses 1, 2, 3, ..., n, and n tin pieces with masses 1, 2, 3, ..., n. For each material, there is exactly one piece of each mass.
One balance weight is made by melting together one lead piece and one tin piece. Use every piece exactly once to make n weights, and make the mass of every weight a power of two.
Write (x, y) for the choice that combines a lead piece of mass x with a tin piece of mass y. For instance, when n = 5, the pairs (1, 1), (2, 2), (3, 5), (4, 4), and (5, 3) make weights of masses 2, 4, 8, 8, and 8, all of which are powers of two.
Given n, output any one construction that satisfies the condition.
The first line contains an integer n (1 <= n <= 10,000).
For each i from 1 to n, print on the i-th line the mass of the tin piece that should be combined with the lead piece of mass i.
The n printed numbers must use each integer from 1 to n exactly once, and for every i, the sum of i and the printed value must be a power of two.