Juliet is reading a science fiction novel. In one chapter the main character has to get the most out of a cargo spaceship's capacity. The cargo consists of items shaped like a D-dimensional mesh whose size is 3 nodes along every dimension. Each node of the mesh holds one ball, and all balls weigh the same. The connections between balls are so light that their weight is negligible next to the weight of a ball, so the weight of an item is decided only by the number of its nodes. The value of an item is the number of nodes plus the number of connections.
A D-dimensional item has 3D nodes, and there is one connection between every two nodes that are neighbours along a single axis.
| Dimension | Weight | Value |
|---|---|---|
| zero dimension | 1 | 1 |
| first dimension | 3 | 5 |
| second dimension | 9 | 21 |
A spaceship has a limit on the weight it can carry. Load items so that the total weight stays within the limit and the total value is as large as possible. The supply of items is unlimited for every dimension. Exactly one loading reaches the largest total value.
The first line contains the number of test cases N. N is a positive integer.
Each of the next N lines contains one integer K, the cargo capacity of the ship. (1≤K<107)
For each test case, print Xm Xm−1 … X1 X0 on one line, separated by single spaces. Xi is the number of items of dimension i to load for the largest total value, and the count of the highest dimension, Xm, is greater than 0.