#SDNU1255. Problem C. Boooooooo

Problem C. Boooooooo

Description

For given NN, find the smallest pppp,no smaller than NN for which there exists an positive integer hhhh for which

2hh(hh+1)=pp(pp+1)2hh(hh + 1) = pp(pp + 1)

Format

Input

This problem contains multiple test cases. The first line of a multiple input is an integer T(1<T<1000)T (1 <T < 1000)

followed by T input lines. Each line contains an integer N(1<N<81018)N (1 < N < 8*10^{18})

Output

For each given NN, output the smallest pppp, If available pppp does not exist, output 1-1

Samples

1
1
Case #1: 3