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