#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  stack<string> s1;
  for (long long int i = 1; i <= n; i++) {
    string s;
    cin >> s;
    s1.push(s);
  }
  set<string> s2;
  for (long long int i = 0; i < n; i++) {
    if (s2.count(s1.top()) == 0) {
      cout << s1.top() << "\n";
      s2.insert(s1.top());
      s1.pop();
    } else
      s1.pop();
  }
  return 0;
}
