#include<stdio.h>

int main(void)
{
	int wei[10]={1,2,4,8,16,32,64,128,256,512},kai[10];
	int w,i,j;
	while(scanf("%d",&w)!=EOF)
	{
		i=9;  j=0;
		while(0==0)
		{
			if(w-wei[i]>0){
				w-=wei[i];
				kai[j]=wei[i];
				j++;
			}
			else if(w-wei[i]==0){
				kai[j]=wei[i];
				for(i=j;i>0;i--)
					printf("%d ",kai[i]);
				printf("%d\n",kai[0]);
				break;
			}

			i--;
		}
	}
	return 0;
}