#include
#include
int main() {
int N;
scanf("%d", &N);
while(N > 0) {
int posledna_cifra = N % 10;
printf("%d ", posledna_cifra);
N /= 10;
}
return 0;
}
// 134 % 10 = 4
// 134 /= 10 --> 13
// 13 % 10 = 3
// 13 / 10 = 1
// 1 % 10 = 1
// 1 / 10 = 0