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