Arun is Varun's maths teacher. He gives him a function F(X), which is defined as follows :
Now, Arun gives him Q queries and in each query, a value of X is given. Varun's task is to solve for F(X). Since there are many queries help Varun to pass this assignment.
Output can be large, return F(X)mod1000000007.
Input format
First-line contains Q - the number of queries.
Next Q lines contain an integer X.
Output format
Print Q lines each contain the value of F(X).
Constraints
1≤Q≤1051≤X≤1018
For X=1,F(X)=1. Because 1 is not multiple of 2 and 3.
For X=4,F(4)=F(4/2)=F(2/2)=F(1)=1. Because 4 is multiple of 2.
For X=6,F(6)=F(3)+F(2)=F(3/3)+F(2/2)=F(1)+F(1)=2. Because 6 is multiple of both 2 and 3.