eolymp
bolt
Try our new interface for solving problems
Problems

Black box

Black box

Each of n of the same balls was assigned by one of the numbers 1, 2, 4, 8, .., 2n - 1. Having checked that all the numbers on the balls were different, the balls were placed in a black box. Petya took out several balls, found the sum of the numbers on them and got the result m. Print the numbers on the balls that Petya took out.

Input

One integer m (1m109).

Output

Print the balls numbers in increasing order.

Time limit 1 second
Memory limit 128 MiB
Input example #1
27
Output example #1
1 2 8 16
Source 2023 ІІІ stage All-Ukraine olympiad, Zhitomyr region, February 12