#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;
int main(){
	freopen("Weighing.in","r",stdin);
	long n,l=0;long t;
	cin >>t;
	for (int i=0; i<t; i++){ cin>>n;
	for (int j=1; pow(2,(double)j)<n; j++) l=j;
	if (pow(2,(double)l+1)==n) l++;
	printf("%d\n",l);
	}
return 0;
}