#46405: set<pair<int, int>>


1121228@stu.wghs.tp.edu.tw (你知道我是誰嗎!!??)


#include <bits/stdc++.h>
using namespace std;

int main(){
    int n, max=0;
    string p;
    set<pair<int, string>> s;
    cin >> n;
    while(n--){
        cin >> p;
        s.insert(make_pair(p.length(), p));
        if(p.length()>max) max=p.length();
    }
    for(auto t : s){
        for(int i=0; i<(max-t.first); i++){
            cout << ' ';
        }
        cout << t.second << endl;
    }
    return 0;
}