One, two, not three#8585

One, two, not three

2 seconds
64 megabytes
Easy

In number theory, interesting patterns arise when considering numbers composed only of specific digits.

For a given number , you are to find the smallest positive integer that consists only of the digits and and is divisible by .

Input

A single integer (1 \le N \le 10^6).

Output

Print the smallest number composed only of the digits and that is divisible by . If no such number exists or if its length exceeds digits, print "Impossible".

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading