#P1326A. Bad Ugly Numbers

    ID: 1793 远端评测题 1000ms 256MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>constructive algorithmsnumber theory*1000

Bad Ugly Numbers

Description

You are given a integer nn (n>0n > 0). Find any integer ss which satisfies these conditions, or report that there are no such numbers:

In the decimal representation of ss:

  • s>0s > 0,
  • ss consists of nn digits,
  • no digit in ss equals 00,
  • ss is not divisible by any of it's digits.

The input consists of multiple test cases. The first line of the input contains a single integer tt (1t4001 \leq t \leq 400), the number of test cases. The next tt lines each describe a test case.

Each test case contains one positive integer nn (1n1051 \leq n \leq 10^5).

It is guaranteed that the sum of nn for all test cases does not exceed 10510^5.

For each test case, print an integer ss which satisfies the conditions described above, or "-1" (without quotes), if no such number exists. If there are multiple possible solutions for ss, print any solution.

Input

The input consists of multiple test cases. The first line of the input contains a single integer tt (1t4001 \leq t \leq 400), the number of test cases. The next tt lines each describe a test case.

Each test case contains one positive integer nn (1n1051 \leq n \leq 10^5).

It is guaranteed that the sum of nn for all test cases does not exceed 10510^5.

Output

For each test case, print an integer ss which satisfies the conditions described above, or "-1" (without quotes), if no such number exists. If there are multiple possible solutions for ss, print any solution.

Samples

样例输入 1

4
1
2
3
4

样例输出 1

-1
57
239
6789

Note

In the first test case, there are no possible solutions for ss consisting of one digit, because any such solution is divisible by itself.

For the second test case, the possible solutions are: 2323, 2727, 2929, 3434, 3737, 3838, 4343, 4646, 4747, 4949, 5353, 5454, 5656, 5757, 5858, 5959, 6767, 6868, 6969, 7373, 7474, 7676, 7878, 7979, 8383, 8686, 8787, 8989, 9494, 9797, and 9898.

For the third test case, one possible solution is 239239 because 239239 is not divisible by 22, 33 or 99 and has three digits (none of which equals zero).