Unusual Number

Given digit count a and multiplier b, find the smallest a-digit number whose last digit moved to the front equals b times the number, or report Impossible.

Medium6MathNumber theoryImplementationBrute forceNo attempts yetTime limit2sMemory limit512 MB

Problem

A positive integer NN is an unusual number when it satisfies both of the conditions below.

  • NN has aa digits and its leading digit is not 0.
  • Let NN' be the number formed by moving the last digit of NN to the front. Then N=b×NN' = b \times N.

Given aa and bb, find the smallest unusual number.

Input

The first line contains aa and bb, separated by a single space. (1a1061 \le a \le 10^6, 1b91 \le b \le 9)

Output

Print the smallest unusual number on the first line. If no number satisfies the conditions, print Impossible.