#include<iostream>
#include<vector>
#include<string>
#include<sstream>
#include<algorithm>

using namespace std;

int main(){
    string input;
    getline(cin,input);
    for(char c : input ){
        if(!isalpha(c) && c!='-'){
            while (ss>>word){
        words.push_back(word);
        maxLen=std::max(maxLen,(int)word.length());
        cout<<word<<endl;
            
            return 0;
        }
    }
    vector<string>words;
    stringstream ss(input);
    string word;
    int maxLen=0;
    while (ss>>word){
        words.push_back(word);
        maxLen=std::max(maxLen,(int)word.length());
        cout<<word<<endl;;
    }
    for(int i=0;i<maxLen;++i){
        string row="";
        for(const string& w: words){
            if(1<w.length())row+=w[i];
            else row+=" ";
        }
    }
    return 0;
}