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