#include <iostream>
#include <cstring>
#include <algorithm>
#include <unordered_map>
using namespace std;
const int N = 200010, M = 11;
int n;
int l[N], r[N], idx;
char str[N][M];
unordered_map<string, int> pos;
int insert(int k, int x)//将x插入到k的后面
{
l[x] = k, r[x] = r[k];
l[r[x]] = x, r[k] = x;
}
void remove(int k)//删除k
{
l[r[k]] = l[k];
r[l[k]] = r[k];
}
int main()
{
//初始化一下,0为链表的头,1为链表的尾
l[0] = r[0] = 1;
l[1] = r[1] = 0;
idx = 2;//新添加的结点从下标2开始
scanf("%d", &n);
for (int i = 0; i < n; i ++ )
{
char* s = str[idx];
scanf("%s", s);
if (pos.count(s))
{
int k = pos[s];
remove(k);
insert(0, k);
}
else
{
pos[s] = idx;
insert(0, idx);
idx ++ ;
}
}
for (int i = r[0]; i != 1; i = r[i])
puts(str[i]);
return 0;
}