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