#595. 「Nowcoder多校 2019 Day5」digits 2

「Nowcoder多校 2019 Day5」digits 2

当前没有测试数据。

题目描述

You are given a positive integer n which is at most 100.

Please find a positive integer satisfying the following conditions:

  1. The sum of all digits of this number is dividable by n.

  2. This number is also dividable by n.

  3. This number contains no more than 104 10^4 digits.

If such an integer doesn't exist, output "Impossible" (without quotation marks). If there are multiple such integers, please output any one.

输入格式

The first line contains one integer T indicating that there are T tests.

Each test consists an integer n in a single line.

  • 1T100 1 \le T \le 100

  • 1n100 1 \le n \le 100

输出格式

For each query, output one line containing the answer. The number you print cannot have leading zeros. If there are multiple answers, you can print any. If such an integer doesn't exist, output "Impossible" (without quotation marks) in a single line.

样例

样例输入 1

3
1
9
12

样例输出 1

1
666666
888

样例解释 1

For the last test, 888 is dividable by 12 (888 = 12 * 74) and 8 + 8 + 8 = 24 is also dividable by 12 (24 = 12 * 2).