Binary Numbers#2817

Binary Numbers

1 Sekunde
64 Megabyte
Sehr leicht

Given a positive integer , print out the positions of all 's in its binary representation. The position of the least significant bit is .

The positions of 's in the binary representation of are , , .

Write a program which for each data set:

Eingabe

The first line of the input contains exactly one positive integer equal to the number of data sets, 1 \leq d \leq 10. The data sets follow.

Each data set consists of exactly one line containing exactly one integer , 0 \leq n \leq 10^6.

Ausgabe

The output should consist of exactly lines, one line for each data set.

Line , 1 \leq i \leq d, should contain an increasing sequence of integers separated by single spaces—the positions of 's in the binary representation of the -th input number.

Beispiele

Beispiel 1

Loading
Loading