#include <stdio.h>
#include <math.h>
int main(void)
{
	int nisin[10]={0};
	int n,i;
	while(scanf("%d",&n) != EOF)
	{
		int count=0,count2=0;
		for(i=0;;i++)
		{
			nisin[i] = n%2;
			n /= 2;
			if(n==0)break;
		}
		for(i=0;i<10;i++)
		{
			if(nisin[i])count++;
		}
		for(i=0;i<9;i++)
		{
			if(nisin[i])
			{
				printf("%d",(int)(pow(2,i)));
				count2++;
				if(count2==count)printf("\n");
				else printf(" ");
			}
		}
	}
	return 0;
}