#include<iostream>
#include<sstream>
#include<vector>
using namespace std;
int main(){
    string s, w;
    getline(cin,s);
    for (char c : s)
        if (!isalpha(c)&&c!=''){
            cout<<"invalid input";
            return 0;
        }
        stringstream ss(s);
        vector<string>v;
        int maxLen=0;
        while(ss >> w){
            v.push_back(w);
            maxLen = max(maxLen, (int)w.length());
}
for(int i=0; iu<maxLen;i++){
    for(int j=0; j<v.size();j++)
        cout<<(i<v[j].length()?v[j][i]:'');
        cout<< endl;
        return 0;
}