var a,n,c,i:longint;
begin
assign(input, 'weighing.in');
reset(input);
read(n);
for i:=1 to n do begin;
readln(a);
c:=0;
while (a<>0) or (a<>1) do begin;
a:=a div 2;
c:=c+1;
end;
writeln(c);
dec(n);
end;

end.