#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
bool prime[2000005];
vector<int> myarr;
void myprime(int n) {
  for (long int i = 0; i < n; i++) prime[i] = true;
  for (int p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (int i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (int p = 2; p <= n; p++)
    if (prime[p]) myarr.push_back(p);
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void swap(int &a, int &b) {
  int temp = a;
  a = b;
  b = temp;
}
int max(int a, int b) { return (a > b ? a : b); }
vector<long long> a(15);
void moj(long long n) {}
bool cmp(pair<string, int> p1, pair<string, int> p2) {
  if (p2.second < p1.second) return true;
  return false;
}
void solve() {
  int n;
  cin >> n;
  map<string, int> ms;
  vector<string> vs(n);
  for (long int i = 0; i < n; i++) cin >> vs[i];
  int rr = 1;
  for (long int i = 0; i < n; i++) {
    string s;
    s = vs[i];
    ms[s] = rr;
    rr++;
  }
  vector<pair<string, int> > sss;
  for (auto &i : ms) {
    sss.push_back(i);
  }
  sort(sss.begin(), sss.end(), cmp);
  for (auto i : sss) {
    cout << i.first << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
