spoj#WINDMILL. The Tall Windmills
The Tall Windmills
In the later days of his career Johnny purchased a long and narrow strip of land on which he intended to erect a row of windmills, and live off the electrical energy produced by his little power plant. To his dismay, he soon discovered that he had been badly cheated - throughout most of the year the wind blew lengthwise through the strip, rather than in a perpendicular direction. As a result, the wind was certain to lose most of its force on the first windmill it encountered, leaving all the others idle. Johnny could only see one way of coping with this problem, namely - to vary the height of windmills situated relatively close to each other. More precisely, Johnny intends to build exactly n windmills along a straight line, with equal spacing (of one Bytelandian furlong) between adjacent windmills. It has been established by a team of experts that if two windmills are k Bytelandian furlongs apart from each other, their height must differ by at least n-k Bytelandian yards. No windmill may ever be lower than 1 Bytelandian yard, and some, obviously, may need to be considerably higher. But tall windmills are far more expensive to construct, and thus you have been asked to choose the heights of Johnny's windmills in such a way as to guarantee that the tallest windmill has the minimum possible height.
Input
Input starts with a single integer t, the number of test cases (t<=100). t test cases follow.
Each test case consists of exactly one integer n (1<=n<=100) - the number of windmills Johnny intends to construct.
Output
For each test case output a line with exactly n numbers, denoting the heights of successive windmills given in the order in which they are arranged along the road.
Example
Input: 3 1 2 3</p>Output: 1 1 2 2 4 1