#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int main() {
    int n, i;
    string word;
    cin >> n;
    vector<string>vs;
    for (i = 0; i < n; i++) {
        cin >> word;
        vs.push_back(word);
        /*
        for (int j = i - 1; j >= 0; j--) {
            if (vs[j]>vs[j+1]) {
                string temp = vs[j];
                vs[j] = vs[j + 1];
                vs[j + 1] = temp;
            }
            else {
                break;
            }
        }
        */
    }
    sort(vs.begin(),vs.end());
    for (i = 0; i < n; i++) {
        cout << vs[i]<<endl;
    }
}