#include<bits/stdc++.h>
using namespace std;
int main()
{
vector<string>an;
int m = 0, l;
string cn;
while(getline(cin, cn))
{
l = cn.size();
if(m < l)
m = l;
an.push_back(cn);
}
int i, j, k;
k = an.size();
string rw = "";
for(i=0; i<m; i++)
{
for(j=0; j<k; j++)
{
if(i<an[j].size())
rw += an[j][i];
else
rw += " ";
}
reverse(rw.begin(), rw.end());
cout << rw << endl;
rw.clear();
}
return 0;
}
Comments
Post a Comment