

The binary representation of ‘5’ is 101. Therefore the number of set bits is 2.
First-line contains ‘T’, denoting the number of Test cases.
For each Test case:
The first line contains an integer, ‘N’, denoting the number until you have to print the number of set bits in its binary representation.
For each test case, you have to print ‘N + 1’ space-separated integers, denoting the number of set bits in the binary representation.
You don’t need to print anything. It has already been taken care of. Just implement the given function.
1 <= ‘T’ <= 10
0 <= ‘N’ <= 10^5
Note- Sum of ‘N’ over all test cases does not exceed 10^5.
Time Limit: 1 sec
Algorithm:
Algorithm: