Under construction

Still being built. Things may change

Bad Treap

Time limit2sMemory limit512 MB

Summary
Output n distinct integers so that a treap with priorities y = sin(x) has height n, forming a single chain.
Level

Medium7 of 10

Topics
Math, Number theory, Tree
Solved
No attempts yet

Problem

A treap, also known as a Cartesian tree, is a data structure that stores a set of keys in a binary search tree.

Each node of this tree is characterized by a pair (x, y).

The x values of the nodes are the stored keys. They obey the binary search tree rule: all x values in the left subtree of a node are smaller than its x value, and all x values in the right subtree are larger.

The y values of the nodes obey the heap rule: the y value of a node is less than or equal to the y value of its parent.

The y value for each created node is usually chosen randomly according to some distribution. This gives good average time complexity for many operations.

The name is a portmanteau of two words: TRee + hEAP = TREAP.

A treap with 7 nodes; its height is 4A treap for the sample test

Benjamin decided that nondeterminism in choosing y is bad, because the execution time changes from one run to another. He calculates y for each node deterministically from its x, using the rule y=sin⁡(x)y = \sin(x). He is especially glad that distinct integer x values always have distinct y values.

Barbara knows that a nondeterministic treap performs worst on a bad random sequence, while a deterministic treap performs worst on a bad set of keys. She wants to show Benjamin n integer keys that, when stored in his data structure, form a treap of height n, the most unbalanced case possible.

Input

The input is a single integer n (1≤n≤500001 \le n \le 50000).

Output

Output n lines, each containing a distinct integer key. All keys must be between −231-2^{31} and 231−12^{31} - 1, inclusive. A treap built on these keys with the rule y=sin⁡(x)y = \sin(x) must have height n.

Examples1

  1. Example 1

    Input
    4
    
    Expected output
    -2
    0
    -1
    -4