#include <bits/stdc++.h>
#define endl "\n"
#define LL long long
#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define fk freopen("input.txt", "r", stdin)
#define ALL(x) x.begin(), x.end()
#define INS(x) inserter(x, x.begin())
using namespace std;
typedef pair <int,int> PII;
int maxn[1005];
int cnt;
vector <string> now;
vector <vector <string> > total;
int main(){
string s, words;
IOS;
memset(maxn, 0, sizeof(maxn));
while(getline(cin, s)){
stringstream ss(s);
cnt = 0;
now.clear();
while(ss >> words){
maxn[cnt] = max(maxn[cnt], (int)words.size());
cnt++;
now.push_back(words);
}
total.push_back(now);
}
for(int r = 0; r < total.size(); r++){
for(int c = 0; c < total[r].size(); c++){
cout << total[r][c];
for(int i = 0; i < maxn[c] - total[r][c].length() + 1; i++)
if(c < total[r].size() - 1)
cout << " ";
}
cout << endl;
}
return 0;
}
相关文章: