Given a number n, count minimum steps to minimise it to 1 according to the following criteria:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains an integer N denoting the number n.
Output the minimum steps to minimise the number in a new line for each test case.
1<= T <=1000
1<= N <=10000