def Fib(data, fib, result, di, fi):
if data == 0:
output = ''
for i in range(len(fi)):
if fi[i] in result:
output = '1' + output
else:
output = '0' + output
print(f'{di} = {int(output)} (fib)', end="\n")
return
for i in range(len(fib)):
Fib(data-fib[i], fib[i+2:], result+[fib[i]], di, fi)
def main():
n = int(input())
fib = [1, 2, 3, 5, 8, 13, 21, 34]
for i in range(n):
data = int(input())
Fib(data, fib, [], data, fib)
main()