#include<bits/stdc++.h>using namespace std;main(){int a;while(cin>>a){ cout<<a<<endl; while(a/10>=10){ a/=10; cout<<a<<endl; } if(a>=10) cout<<a/10<<endl;}}