Disclaimer: All characters appearing in this question are fictitious. Any resemblance to real person, living or dead, are purely coincidental.
Rahul Gandhi is vexed on the launch of BHIM app. Out of rage to prove himself , he designs some functions, and presents them before the party –
The two functions are and .
Now, find out the smallest m such that for some given integer N.
Input Format:
The first line consists of T integers .
Each test case consists of a positive integer N.
Output Format:
For each test case, output the desired result.
Input Constraints:
Note
If no such m exists, then output "-1" (without quotes).