Consider a permutation of integer numbers from to . Let us call length of the longest monotonic subsequence of the permutation its ugliness.
For example, the ugliness of the permutation <, , , , > is because it has a monotonic subsequence (, , , ) of length , but has none of length . The ugliness of the permutation <, , , , , > is because it has a monotonic subsequence (, , ) of length .
Let us call beautiful those permutations that have a smallest possible ugliness for given . Given , you must find the first in lexicographic order beautiful permutation of size .
Input file contains (1 \le n \le 10000).
Output the first in lexicographic order beautiful permutation of size .
Example 1