#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i;
  cin >> n;
  string s;
  map<string, vector<long long>> a;
  vector<pair<string, long long>> b;
  map<string, vector<long long>>::iterator k;
  vector<pair<string, long long>>::iterator j;
  for (i = 1; i <= n; i++) {
    cin >> s;
    a[s].push_back(i);
  }
  for (k = a.begin(); k != a.end(); k++)
    b.push_back(make_pair((*k).first, *(max_element(((*k).second).begin(),
                                                    ((*k).second).end()))));
  sort(b.begin(), b.end(),
       [](const pair<string, long long> &left,
          const pair<string, long long> &right) {
         return left.second > right.second;
       });
  for (j = b.begin(); j < b.end(); j++) cout << (*j).first << "\n";
  return 0;
}
