#include <stdio.h>
int main() {
int num, remainder;
int i = 0;
scanf("%d", &num);
while (num > 0) {
remainder = num % 10;
printf("%d ", remainder);
num /= 10;
i++;
}
return 0;
}