#include <iostream> using namespace std; int main() { int k; cin >> k; while(k!=0){ cout<<k%10; cout<<" "; k=k/10; } return 0; }