A little kitten has climbed onto a fence and is hopping along it.
The fence is made of N pickets spaced evenly around a circle. The kitten hops along the fence K pickets at a time. For example, when N = 8 and K = 3 the kitten lands on the pickets 1, 4, 7, 2, ... in that order. The kitten keeps hopping as long as it lands on a picket it has not visited yet. The moment it lands on a picket it has already stepped on, it climbs straight down off the fence.
Given the number of pickets N, find every value of K (1≤K≤N) for which the kitten, hopping in the way described above, steps on every picket of the fence.
The first line contains the number of test sets Z (1≤Z≤10). The descriptions of the sets then follow.
Each set consists of a single line containing the natural number N (1≤N≤1000000) described above.
For each set, print on its own line all values of K that satisfy the condition, in increasing order. Separate adjacent numbers with a single space and do not print a trailing space at the end of the line.