You have to find the minimum number of operations needed to reach 1.
Input
The first line of the input will contain an integer T (1≤T≤106), the number of test cases. Each of the next T lines will contain an integer N (1≤N≤106), as described in the problem statement.
Output
For each test case, you have to find the minimum number of operations needed to reach 1.