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

int main()
{
    string s;
    //freopen("1.txt", "r", stdin);
    vector<string> ans;
    int n;
    cin >> n;
    while(cin >> s) {
        ans.push_back(s);
    }
    sort(ans.begin(), ans.end());
    for(int i = 0; i < ans.size(); i++) {
        cout << ans[i] << endl;
    }
    return 0;
}