Strange sequence
Easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Create a sequence a[1]
, a[2]
, ..., a[n]
, consisting of n elements, such that the following conditions are true:
0 <
a[1]
<a[2]
< ... <a[n]
<10^6
,ld(
a[1]
) = fd(a[2]
), ld(a[2]
) = fd(a[3]
), ..., ld(a [n-1]
) = fd(a[n]
). 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 (1 ≤ n ≤ 10^5
).
Output
Print any sequence a[1]
, a[2]
, ..., a[n]
in one line that satisfies the condition of the problem.
It is guaranteed that such a sequence always exists under the given conditions.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 812
Acceptance rate 15%