_{This problem is a programming version of Problem 42 from projecteuler.net}

The term of a sequence of triangle numbers is given by,

so the first ten triangle numbers are:

You are given an integer. If it is a triangular number , print the term corresponding to this number, else print

**Input Format**

First line of input contains an integer denoting the number of testcases. Each of the next lines contains an integer.

**Constraints**

**Output Format**

Print the answer corresponding to each test case in a new line.

**Sample Input**

```
3
2
3
55
```

**Sample Output**

```
-1
2
10
```