#include <bits/stdc++.h> #include <string> #include <vector> #include <map> using namespace std; int main() { string s; int frequency=0; vector<string>vec; while(getline(cin,s)) { v.push_back(s); frequency=max(frequency,(int)s.length()); } for(int i=0;i<frequency;i++) { for(int j=vec.size()-1;j>=0;j--) { if(i < vec[j].length()) { printf("%c",vec[j][i] ); } else printf("%c",' '); } cout<<endl; } return 0; }