Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
A. Bad Ugly Numbers

time limit per test

1 secondmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are given a integer $$$n$$$ ($$$n > 0$$$). Find any integer $$$s$$$ which satisfies these conditions, or report that there are no such numbers:

In the decimal representation of $$$s$$$:

- $$$s > 0$$$,
- $$$s$$$ consists of $$$n$$$ digits,
- no digit in $$$s$$$ equals $$$0$$$,
- $$$s$$$ is not divisible by any of it's digits.

Input

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

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

It is guaranteed that the sum of $$$n$$$ for all test cases does not exceed $$$10^5$$$.

Output

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

Example

Input

4 1 2 3 4

Output

-1 57 239 6789

Note

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

For the second test case, the possible solutions are: $$$23$$$, $$$27$$$, $$$29$$$, $$$34$$$, $$$37$$$, $$$38$$$, $$$43$$$, $$$46$$$, $$$47$$$, $$$49$$$, $$$53$$$, $$$54$$$, $$$56$$$, $$$57$$$, $$$58$$$, $$$59$$$, $$$67$$$, $$$68$$$, $$$69$$$, $$$73$$$, $$$74$$$, $$$76$$$, $$$78$$$, $$$79$$$, $$$83$$$, $$$86$$$, $$$87$$$, $$$89$$$, $$$94$$$, $$$97$$$, and $$$98$$$.

For the third test case, one possible solution is $$$239$$$ because $$$239$$$ is not divisible by $$$2$$$, $$$3$$$ or $$$9$$$ and has three digits (none of which equals zero).

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: May/06/2021 11:41:41 (h2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|