#include<cstdio>
using namespace std;
int main(void)
{
	int n;
	bool kari = 0;
	int a[10] = {1,2,4,8,16,32,64,128,256,512};
	while(scanf("%d",&n) != EOF)
	{
		bool flag[10] = {0};
		for(int i = 9;i >= 0;i--)
		{
			if(a[i] <= n)
			{
				n -= a[i];
				flag[i] = 1;
			}
		}
		for(int i = 0;i < 10;i++)
		{
			if(flag[i] == 1)
			{
				printf("%d",a[i]);
				for(int j = i+1;j < 10;j++)
				{
					if(flag[j] == 1) kari = 1;
				}
				if(kari == 1) printf(" ");
				else printf("\n");
				kari = 0;
			}
		}
	}
	
	return 0;
}