#include<stdio.h>
int main()
{
long int n;
int b[10],i=0,j;
scanf("%ld",&n);
while(1)
{
if(n>0)
{
b[i]=n%10;
n=n/10;
i++;
}
else
break;
}
for(j=i-1;j>=0;j--)
printf("%d ",b[j]);
return 0;
}
int main()
{
long int n;
int b[10],i=0,j;
scanf("%ld",&n);
while(1)
{
if(n>0)
{
b[i]=n%10;
n=n/10;
i++;
}
else
break;
}
for(j=i-1;j>=0;j--)
printf("%d ",b[j]);
return 0;
}