SDE Path

Powers of 2 up to N

Easy

Powers of 2 up to N

List the powers of 2 that do not exceed N.

Input format

One line with an integer N (at least 1).

Output format

Print every power of 2 that is less than or equal to N, starting from 1, space-separated.

Constraints

  • Values fit in a 64-bit signed integer
  • Trailing whitespace and a trailing newline are ignored by the judge

Read from stdin, write to stdout. Sample cases below show the exact format.

Sample cases

Example 1
Input
10
Expected output
1 2 4 8
Example 2
Input
1
Expected output
1