# Product of Digits

Your task is to find the minimal positive integer number P so that the product of digits of P is exactly equal to S.

**INPUT**

The first line of input contains the number of test cases T.

Next T lines conatains the integer S.

**OUTPUT**

For each test case print the integer P in separate line.Print -1 in separate line if no such integer exist.

**CONSTRAINT**

```
```

0 < T <= 100

1 < S <= 10^9

**SAMPLE INPUT**

```
```

1

10

**SAMPLE OUTPUT**

```
```

25

*Problem Setter : Akshay Kumar*

**Languages:**AWK,Bash,Brain,C,C++,Java,C#,JavaScript,Pascal,Perl,PHP,Python,Python3,Ruby,Text