#include <bits/stdc++.h>
using namespace std;
int Hash(string);
long long int h(string);
void printL(list<string> &l) {
  register list<string>::iterator it;
  for (it = l.begin(); it != l.end(); it++) {
    cout << *it << endl;
  }
}
struct node {
  string data;
  bool visited = false;
};
int main() {
  register int qtd_names, posix;
  register bool auxbool = true;
  register string name;
  register list<string> order;
  register list<string> hash_table[200000];
  register list<string>::iterator iterator_names;
  cin >> qtd_names;
  while (qtd_names) {
    cin >> name;
    order.push_front(name);
    qtd_names--;
  }
  for (iterator_names = order.begin(); iterator_names != order.end();
       iterator_names++) {
    register int posix = Hash(*iterator_names);
    if (!hash_table[posix].empty()) {
      register list<string>::iterator iterator_help = find(
          hash_table[posix].begin(), hash_table[posix].end(), *iterator_names);
      if (iterator_help == hash_table[posix].end()) {
        cout << *iterator_names << endl;
        hash_table[posix].push_front(*iterator_names);
      }
    } else {
      cout << *iterator_names << endl;
      hash_table[posix].push_front(*iterator_names);
    }
  }
  return 0;
}
int Hash(string word) { return h(word) % 200000; }
long long int h(string word) {
  long long int count = 0;
  for (register int i = 0; i < word.size(); i++) {
    count += (i + 1) * (int)word[i];
  }
  return (48127 * count);
};
