Given a monotonic sequence in which each natural number k occurs exactly k times: 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ...
Given a natural n print the first n members of this sequence. Only one loop is allowed per task.
Input
Enter a natural number
n.
Imprint
Print the answer to the problem.
Examples
| # |
Input |
Output |
| 1 |
2 |
1 2 |
| 2 |
5 |
1 2 2 3 3 |