Problem: Mrs. Smith is trying to contact her husband, John Smith, but she forgot the secret phone number!
The only thing Mrs. Smith remembered was that any permutation of can be a secret phone number. Only those permutations that minimize secret value might be the phone of her husband.
The sequence of integers is called a permutation if it contains all integers from to exactly once.
The secret value of a phone number is defined as the sum of the length of the longest increasing subsequence (LIS) and length of the longest decreasing subsequence (LDS).
A subsequence where is called increasing if . If , a subsequence is called decreasing. An increasing/decreasing subsequence is called longest if it has maximum length among all increasing/decreasing subsequences.
For example, if there is a permutation , LIS of this permutation will be , so the length of LIS is equal to . LDS can be , , or , so the length of LDS is .
Note, the lengths of LIS and LDS can be different.
So please help Mrs. Smith to find a permutation that gives a minimum sum of lengths of LIS and LDS.
Input Format: The only line contains one integer () — the length of permutation that you need to build.
Output Format: Print a permutation that gives a minimum sum of lengths of LIS and LDS.
If there are multiple answers, print any.
Note: In the first sample, you can build a permutation . LIS is (or ), so the length of LIS is equal to . LDS can be ony of , , , or . The length of LDS is also equal to . The sum is equal to . Note that is not the only permutation that is valid.
In the second sample, you can build a permutation . LIS is (or ), so the length of LIS is equal to . LDS is , so the length of LDS is equal to . The sum is equal to . Note that permutation is also valid.