#include<bits/stdc++.h> using namespace std; int main(){ int n,t; cin>>n; while(n!=0){ t=n%10; cout<<t<<" "; n=n/10; } return 0; }