- Time limit: 1.00 s
- Memory limit: 512 MB
A triangle number is a positive integer of the form . The first triangle numbers are , , , and .
Every positive integer can be represented as a sum of triangle numbers. For example, and .
Given a positive integer , determine the smallest number of triangle numbers that sum to .
Input
The first line has an integer : the number of tests.
After that, each line has a positive integer .
Output
For each test, print the smallest number of triangle numbers.
Constraints
Example
Input:
5 1 2 3 42 1337
Output:
1 2 1 2 3