#include<iostream>
#include<sstream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
    string s;
    getline(cin , s);
    for(char c: s){
        if(!isalpha(c)&&c!=''){
            cout<<"Invalid input";
            return 0;
        }
    }
    stringstream ss(s);
    vector<string>words;
    string word;
    while(s>>word){
        word.push_back(word);
    }
    int maxlen=0;
    for(string w:word){
        maxlen=max(maxlen,(int)w.length());
    }
    for(int i=0;i<maxlen;i++)
    {
        string line="";
        for(int j=9;j<word size();j++)
        {
            if(i<words[j].length())
            line+=""
        }
        while(!line.empty()&&line.back()=='')
        line.pop_back();
        cout<<line<<endl;
    }
    return 0;
}