1525 枚举子集


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

对于一个数n,定义n的子集为这样的整数t的集合:

t满足n|t=n.(按位或)

Input

多组测试数据,每组数据一行,表示一个整数n.测试数据保证子集规模小于1000.(n在int范围内)

Output

对于每组数据,按从大到小的顺序输出n的子集,一行一个. 每组数据后都输出一个空行.

Sample

Input

2
4

Output

2
0

4
0

Source: zjut_DD


Comments

There are no comments at the moment.