Limits 1s, 512 MB

Amin and Belal are two friends. Both have good knowledge about graph and tree in data structure part. Now they discuss about some programming problems which are related to these topics. Amin now figure out a binary tree which are consists of some nodes and edges. A binary tree is a tree in which each node has at most two children, which are referred to as the left child and the right child. The following figure contains a binary tree.

Without fill up one level it can not go another level of the tree and node number is sequentially such as a figure. Now Amin asked Belal the minimum level of a node. Belal asked your help and I think you are a good programmer. So please help Belal and build the tree efficiently to get minimum level of a node.

Input

Input starts with an integer TT (1T1000001 \le T \le 100000), no of test cases. And for each cases an integer number NN (1N1000001 \le N \le 100000), denoting the number of nodes.

Output

Output the minimum level no of the node of the binary tree.

Sample

InputOutput
2
1
3
Case 1: 1
Case 2: 2

Submit

Login to submit.

Statistics

96% Solution Ratio
Cloud_Earliest, Mar '20
atiqurrahman99Fastest, 0.0s
tusharLightest, 1.3 MB
Nusab19Shortest, 68B
Toph uses cookies. By continuing you agree to our Cookie Policy.