580. Bits Game

0

Easy

Given a non-negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and print them as space separated integers.

Input Format

Input a non negative integer.

Output Format

Print answer for each number less than num in space separated manner.

Example

Input

5

Output

0 1 1 2 1 2

Constraints

0 <= n <= 105
Loading...

View Submissions

Console