#P1699A. The Third Three Number Problem

    ID: 988 Type: RemoteJudge 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: 3 Uploaded By: Tags>constructive algorithmsmath*800

The Third Three Number Problem

Description

You are given a positive integer nn. Your task is to find any three integers aa, bb and cc (0a,b,c1090 \le a, b, c \le 10^9) for which (ab)+(bc)+(ac)=n(a\oplus b)+(b\oplus c)+(a\oplus c)=n, or determine that there are no such integers.

Here aba \oplus b denotes the bitwise XOR of aa and bb. For example, 24=62 \oplus 4 = 6 and 31=23 \oplus 1=2.

Each test contains multiple test cases. The first line contains a single integer tt (1t1041 \le t \le 10^4) — the number of test cases. The following lines contain the descriptions of the test cases.

The only line of each test case contains a single integer nn (1n1091 \le n \le 10^9).

For each test case, print any three integers aa, bb and cc (0a,b,c1090 \le a, b, c \le 10^9) for which (ab)+(bc)+(ac)=n(a\oplus b)+(b\oplus c)+(a\oplus c)=n. If no such integers exist, print 1-1.

Input

Each test contains multiple test cases. The first line contains a single integer tt (1t1041 \le t \le 10^4) — the number of test cases. The following lines contain the descriptions of the test cases.

The only line of each test case contains a single integer nn (1n1091 \le n \le 10^9).

Output

For each test case, print any three integers aa, bb and cc (0a,b,c1090 \le a, b, c \le 10^9) for which (ab)+(bc)+(ac)=n(a\oplus b)+(b\oplus c)+(a\oplus c)=n. If no such integers exist, print 1-1.

Sample Input 1

5
4
1
12
2046
194723326

Sample Output 1

3 3 1
-1
2 4 6
69 420 666
12345678 87654321 100000000

Note

In the first test case, a=3a=3, b=3b=3, c=1c=1, so (33)+(31)+(31)=0+2+2=4(3 \oplus 3)+(3 \oplus 1) + (3 \oplus 1)=0+2+2=4.

In the second test case, there are no solutions.

In the third test case, (24)+(46)+(26)=6+2+4=12(2 \oplus 4)+(4 \oplus 6) + (2 \oplus 6)=6+2+4=12.