Laika has decided to make a gift for her good friend Azusa, the witch of the highlands. For reasons we do not know, this gift will be a finite set of positive integers. If that were all, it would be a simple matter to choose a gift, but several factors complicate this.
First of all, Laika’s rival, Flatorte, has mysterious magical powers: given two integers and she can create the greatest common divisor of and (i.e. ). If Laika gave a gift that Flatorte could immediately add to (i.e. if she gifted a set for which , yet ), then Flatorte would immediately tease her rival. Therefore, Laika’s gift must not be improvable using Flatorte’s powers: if she gifts then for all it must be the case that .
Secondly, Laika wants the gift to have a certain special significance. It has been days since she met Azusa, and she wants the gift to show this fact. Therefore, she has arranged all of the sets that satisfy the condition explained above in Laikan order (explained below), getting an infinite sequence of finite sets . She wants to select and gift set . Can you help her do so?
Laikan order. Take two sets and . Then, comes before in Laikan order if and only if , or and comes before in Laikan order. For the purposes of this definition, take . Note that this is always well defined for finite sets of positive integers.
Input data
The first line of the input contains a single integer , the number of test cases in this file. The next lines each contain a value of for which we want to know .
Output data
For each of the values of , output the set . To output a set, output a line that begins with the number of elements it has, and the continues with its elements, in increasing order.
Restrictions
# | Points | Restrictions |
---|---|---|
1 | 8 | |
2 | 21 | |
3 | 41 | |
4 | 14 | |
5 | 16 |
Example 1
stdin
5
0
1
2
3
4
stdout
0
1 1
1 2
2 1 2
1 3
Example 2
stdin
4
5
6
100
1000
stdout
2 1 3
3 1 2 3
5 1 2 3 7 8
7 1 2 3 5 10 11 12
Explanations
Note that . These are precisely the sets outputted in the examples (together with their sizes). Observe that — this is because , yet .