eolymp
bolt
Try our new interface for solving problems
Problems

Strange sequence

Strange sequence

Create a sequence a1, a2, ..., an, consisting of n elements, such that the following conditions are true:

  1. 0 < a1 < a2 < ... < an < 106,
  2. ld(a1) = fd(a2), ld(a2) = fd(a3), ..., ld(a [n-1]) = fd(an). Here ld(x) stands for the last digit of x and fd(x) stands for the first digit of x. In other words, the first digit of each element, starting from the 2nd element in this sequence, must be equal to the last digit of the previous element. Note that numbers cannot start with 0.

Input

One integer n (1n105).

Output

Print any sequence a1, a2, ..., an in one line that satisfies the condition of the problem.

It is guaranteed that such a sequence always exists under the given conditions.

Time limit 1 second
Memory limit 128 MiB
Input example #1
4
Output example #1
1 11 111 1111
Input example #2
5
Output example #2
3 35 59 92 200
Source 2023 Azerbaijan, Semifinals, February 18, 10 - 11 classes