Sum of Fibonacci Numbers

No attempts yetTime limit1sMemory limit128 MB

Problem

The Fibonacci numbers fkf_k are defined by fk=fk1+fk2f_k = f_{k-1} + f_{k-2} with initial values f0=0f_0 = 0 and f1=1f_1 = 1. It is well known that every positive integer can be written as a sum of one or more distinct Fibonacci numbers.

A positive integer can be written as such a sum in many ways. For example, 100100 can be written as f4+f6+f11=3+8+89f_4 + f_6 + f_{11} = 3 + 8 + 89, as f1+f3+f6+f11=1+2+8+89f_1 + f_3 + f_6 + f_{11} = 1 + 2 + 8 + 89, or as f4+f6+f9+f10=3+8+34+55f_4 + f_6 + f_9 + f_{10} = 3 + 8 + 34 + 55.

This problem asks you to write a positive integer as a sum of the smallest possible number of distinct Fibonacci numbers. Given a positive integer nn, find the fewest distinct Fibonacci numbers whose sum equals nn.

Input

Input is read from standard input. The first line contains an integer TT, the number of test cases. Each of the following lines contains a single integer nn (1n1,000,000,0001 \le n \le 1{,}000{,}000{,}000).

Output

Write the answer to standard output. For each test case, print the answer on its own line: the minimum number of distinct Fibonacci numbers whose sum equals nn, listed in increasing order and separated by single spaces.