题目描述
Problem Description
A good monomial is a monomial consisting of digits and lowercase English letters, where a lowercase letter is multiplied by an integer coefficient between 1 and 999 inclusive. Note that the coefficient 1 is not omitted in a good monomial.
For example, 123a and 1z are good monomials, but 0a, 1000b, 123, 12ab, a123, and a are not good monomials.
Furthermore, the value of a good monomial is determined by substituting the values defined as follows:
- $ a=1000 $
- $ b=1000a $
- $\dots$
- $ z=1000y $
For example, the value of 123a is $ 123000 $, the value of 20b is $ 20000000 $, and the value of 1c is $ 1000000000 $.
Output the largest possible value of a good monomial that is less than or equal to $\alpha$ in the form of a good monomial.
It can be proven that such a value always uniquely exists under the constraints of this problem.
Input Format
The input is given from the standard input in the following format:
$\alpha$
Output Format
Output according to the instructions in the problem statement.
Sample Input and Output
Sample Input #1
123456789
Sample Output #1
123b
Sample Input #2
77777
Sample Output #2
77a
Sample Input #3
9982443539982448531000000007
Sample Output #3
9i
Notes/Hints
Constraints
- $1000\ \le\ \alpha\ <\ 10^{81}$
- $\alpha$ is an integer
Sample Explanation 1
123b = $ 123000000 $, which is the largest value of a good monomial that is less than or equal to $\alpha\ =\ 123456789$.
Sample Explanation 3
The input may not fit within a 64-bit integer.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分