{$APPTYPE CONSOLE}
var f:text;
T,i,j,a,N: longint;
begin
assignFile(f, 'weighing.in');
reset(f);
read(f, T);
for i:=1 to T do begin
readln(f, N);
j:=0;
a:=1;
repeat
a:=a*3;
inc(j);
until a>=N;
writeln(j);
end;
end.
