#include <bits/stdc++.h>
using namespace std;
map<string, int> mp, mp2;
vector<pair<int, string> > v;
int main() {
  int n, k = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    mp[s]--;
    mp2[s] = -(k++);
  }
  for (map<string, int>::iterator it = mp.begin(); it != mp.end(); it++)
    v.push_back({mp2[(*it).first], (*it).first});
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) cout << v[i].second << endl;
  return 0;
}
