#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<string, int> m;
  map<int, string> m2;
  string inp;
  set<int> s;
  vector<string> vec;
  int i;
  int ctr = 1;
  for (i = 0; i < n; i++) {
    cin >> inp;
    if (m.find(inp) == m.end()) {
      m[inp] = ctr;
      m2[ctr] = inp;
      ctr++;
    }
    vec.push_back(inp);
  }
  for (i = 0; i < n; i++) {
    if (s.find(m[vec[i]]) == s.end()) {
      s.insert(ctr);
      m[vec[i]] = ctr;
      m2[ctr] = vec[i];
      ctr++;
    } else {
      s.erase(m[vec[i]]);
      s.insert(ctr);
      m[vec[i]] = ctr;
      m2[ctr] = vec[i];
      ctr++;
    }
  }
  set<int>::reverse_iterator it;
  for (it = s.rbegin(); it != s.rend(); it++) {
    cout << m2[*it] << endl;
  }
}
