#include <bits/stdc++.h>
using namespace std;
#define MM ios_base::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
int main() {
    MM
    int t;
    cin>>t;
    vector<string> st;
    while(t--) {
        string s;
        cin>>s;
        st.push_back(s);
    }
    int f=1;
    vector<string> v;
    for(int i=st.size()-1;i>=0;i--) {
        if (f) {
            v.push_back(st[i]);
            f=0;
        }
        else {
            auto it = find(v.begin(),v.end(),st[i]);
            if (it == v.end()) {
                v.push_back(st[i]);
            }
        }
    }
    for(int i=0;i<v.size();i++) {
        cout<<v[i]<<'\n';
    }
}