TreeBag enjoys participating in the contests on the famous international competitive programming website CF (ColaFries) in his dreams, and every time he can achieve a single-digit rank in his dreams. One day, he suddenly became curious about the longest increasing subsequence of the array formed by his ranks after each competition. Therefore, he came up with the following question:
Given an integer $$$x$$$, construct a string $$$s$$$ consisting only of decimal digits(i.e. 0,1,2,$$$\dots$$$,8,9) and of length not exceeding $$$10^5$$$, such that the sum of the values of all longest strictly increasing subsequences of $$$s$$$ equals $$$x$$$.
Since TreeBag is BAKA when he wakes up from his dreams, he asks you to help him solve this problem.
The value of a string composed only of decimal digits is defined as the value of the decimal number it represents. For example, the sum of all longest strictly increasing subsequences of the string 001243 is $$$0124+0123+0124+0123=494$$$.
A string $$$t$$$ is a subsequence of $$$s$$$ if and only if $$$t$$$ can be obtained by deleting several characters (possibly $$$0$$$ characters) from $$$s$$$ without changing the order of the remaining characters. For example, the subsequence of 1011101 can be 0, 1, 11111, 101, 0111, but not 000, 101010, 11100.
A string $$$t$$$ is a strictly increasing subsequence of $$$s$$$ if and only if $$$t$$$ is a subsequence of $$$s$$$ and for any $$$1\le i \lt |t|$$$ ($$$|t|$$$ represents the length of $$$t$$$), it holds that $$$t_i \lt t_{i+1}$$$. Here, characters are compared by their numeric value.
A string $$$t$$$ is the longest strictly increasing subsequence of $$$s$$$ if and only if $$$t$$$ is a strictly increasing subsequence of $$$s$$$ and there is no strictly increasing subsequence of $$$s$$$ longer than $$$t$$$.
A single line containing one integer $$$x$$$ ($$$0\le x \le 10^{13}$$$), representing the sum of the values of all longest strictly increasing subsequences of the string you need to construct.
Output a string $$$s$$$ of length not exceeding $$$10^5$$$, such that the sum of the values of all its longest strictly increasing subsequences equals $$$x$$$.
It can be shown that there is at least one answer that satisfies the requirements.
If there are multiple answers that satisfy the requirements, output any one of them.
494
001243
0
0
In the first example, the sum of the values of all longest strictly increasing subsequences of the string 001243 is $$$0124+0123+0124+0123=494$$$.
| Name |
|---|


