#include<iostream>
#include<vector>
#include<sstream>
using namespace std;

int main(){
    string s;
    getline(cin, s);
    
    vector<string> w;
    stringstream ss(s);
    while(ss >> word) w.push_back(word);
    int maxLen = 0;
    for(auto x : w)
    maxLen = max(maxLen, (int)x.size());
    
    for(int i = 0; i<maxLen; i++){
        for(int j=0; j<w.size(); j++)
        cout<<(i<w[j].size() ? w[j][i]: ' ');
        cout<<endl;
    }
}