#include <bits/stdc++.h>
using namespace std;
int main() {
  unordered_map<string, int> mp;
  string s;
  int n;
  cin >> n;
  vector<string> v;
  for (int i = 0; i < n; i++) {
    cin >> s;
    if (mp.find(s) == mp.end()) {
      v.push_back(s);
      mp[s] = v.size() - 1;
    } else {
      v[mp[s]] = "?";
      v.push_back(s);
      mp[s] = v.size() - 1;
    }
  }
  for (int i = v.size() - 1; i >= 0; i--) {
    if (v[i] != "?") cout << v[i] << '\n';
  }
}
