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

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n;

    vector<string> ted(n);

    for (int i = 0; i < n; i++) {
        cin >> ted[i];
    }

    sort(ted.begin(), ted.end());

    for (int i = 0; i < n; i++) {
        if (i == 0 || ted[i] != ted[i - 1]) {
            cout << ted[i] << endl;
        }
    }

    return 0;
}