var
a : array[1..60,1..2] of qword;
i,j,k,m,n,l,t : longint;
begin
a[1,1] :=1;
a[2,1] :=2;
for i :=3 to 60 do a[i,1] :=a[i-1,1]+a[i-2,1];
readln(m);
for l :=1 to m do begin
readln(n);k :=n;
for i :=1 to 60 do a[i,2] :=0;
i :=1;
while a[i,1]<=n do inc(i);
dec(i);
while n>0 do begin
j :=1;
while a[j,1]<=n do inc(j);
dec(j);
n :=n-a[j,1];
a[j,2] :=1
end;
write(k,' = ');
for t :=i downto 1 do
write(a[t,2]);
writeln(' (fib)')
end
end.