#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c,d,e,f,g;
cin>>a;
b=a%10;
c=a/10%10;
d=a/100%10;
e=a/1000%10;
f=a/10000%10;
g=a/100000%10;
cout<<g<<endl;
cout<<f<<endl;
cout<<e<<endl;
cout<<d<<endl;
cout<<c<<endl;
cout<<b<<endl;
}
/**************************************************************
Problem: 1611
User: fandaohan
Language: C
Result: Compile Error
****************************************************************/