power-house-1

Once Gazu went to a power house on a school field trip. There he saw a room where n number of light bulbs were placed horizontally, he found the switch board labelled for all bulbs (1,....,n) and switched on all the bulbs. Then he toggled (on to off or off to on) every ith bulb where i goes from 2 to n. Now he realizes his class teacher is coming to look for him, he wants to turn off all the bulbs immediately but the switches looks exactly the same irrespective of their state (on or off). You have to help him by telling him the index of the bulbs which are switched on.

INPUT
First line contains number of testcases 0<t<1001, next t lines contains total number of light bulbs that were present in the room 1<n<10^6+1

OUTPUT
For each test case print a new line containing the indices of all the light bulbs that were in ON state followed by single whitespace.

SAMPLE INPUT
2
3
5

SAMPLE OUTPUT
1
1 4

Explanation

For second test case when n=5,  the transition of bulbs will be like

1          2          3         4       5      (bulb indices)
OFF     OFF     OFF     OFF     OFF     (initially)
ON      ON      ON      ON      ON     (all the bulbs are ON)
ON      OFF     ON      OFF     ON      (i=2) [he toggled every bulb multiple of 2]
ON      OFF     OFF     OFF     ON      (i=3) [he toggled every bulb multiple of 3]
ON      OFF     OFF     ON      ON      (i=4) [he toggled every bulb multiple of 4]
ON      OFF     OFF     ON      OFF     (i=5=n) [he toggled every bulb multiple of 5, which is equal 
to ‘n’ so he stopped]

So in the end bulb1 and bulb4 were in ON state only

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions: