A decimal number of length consisting only of the characters and is given. You can delete at most characters from . The relative order of the remaining characters does not change after deletion. By deleting characters appropriately, you want to make the remaining number a multiple of or a multiple of . Print any one of the results that satisfy the condition.
Input
The input is given in the following format.
Output
Print the remaining number after deleting characters that satisfy the condition.
If there are multiple correct answers, you may print any of them. It is guaranteed that an answer always exists.
Constraints
- .
- is a string of length consisting only of the characters and .
Subtasks
Samples
입력
6
677667
출력
6776