You have an integer . Initially, .
In one operation, you may perform exactly one of the following:
You are given independent queries. In the -th query, find the smallest integer that can be obtained as and is greater than or equal to .
The first line contains the number of queries .
Each of the next lines contains one integer .
For each query, output the smallest obtainable integer that is greater than or equal to .
The initial value is already at least , so no operation is needed.
Starting from , multiplying by and then by produces . The value cannot be produced.
The value can be produced as . Neither nor can be produced.
The value can be produced as , so a larger value is unnecessary.
The value can be produced as . None of the integers from through can be produced.