#include <bits/stdc++.h>
using namespace std;
int n, nc, i;
string s;
string a[200000], b[200000], c[200000];
int fix[200000];
bool isnew(string s) {
  int A = 0, B = nc - 1, C;
  while (A <= B) {
    C = (A + B) / 2;
    if (s == c[C]) {
      if (fix[C] == 1)
        return false;
      else {
        fix[C] = 1;
        return true;
      }
    }
    if (s > c[C])
      A = C + 1;
    else
      B = C - 1;
  }
}
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(b, b + n);
  s = "";
  for (i = 0; i < n; i++)
    if (s != b[i]) {
      c[nc++] = b[i];
      s = b[i];
    }
  for (i = n - 1; i >= 0; i--)
    if (isnew(a[i])) cout << a[i] << endl;
}
