Polycarp is a big lover of killing time in social networks. A page with a chatlist in his favourite network is made so that when a message is sent to some friend, his friend's chat rises to the very top of the page. The relative order of the other chats doesn't change. If there was no chat with this friend before, then a new chat is simply inserted to the top of the list.

Assuming that the chat list is initially empty, given the sequence of Polycaprus' messages make a list of chats after all of his messages are processed. Assume that no friend wrote any message to Polycarpus.
The first line contains integer *n* (1 ≤ *n* ≤ 200 000) — the number of Polycarpus' messages. Next *n* lines enlist the message recipients in the order in which the messages were sent. The name of each participant is a non-empty sequence of lowercase English letters of length at most 10.
In the first test case Polycarpus first writes to friend by name "alex", and the list looks as follows: 
 1.  alex 
Then Polycarpus writes to friend by name "ivan" and the list looks as follows:
 1.  ivan 1.  alex 
Polycarpus writes the third message to friend by name "roman" and the list looks as follows:
 1.  roman 1.  ivan 1.  alex 
Polycarpus writes the fourth message to friend by name "ivan", to who he has already sent a message, so the list of chats changes as follows:
 1.  ivan 1.  roman 1.  alex
4
alex
ivan
roman
ivan
ivan
roman
alex
8
alina
maria
ekaterina
darya
darya
ekaterina
maria
alina
alina
maria
ekaterina
darya
1
wdi
wdi
2
ypg
ypg
ypg
3
exhll
exhll
arruapexj
arruapexj
exhll
3
fv
le
le
le
fv
8
m
m
m
m
m
m
m
m
m
10
r
r
i
w
k
r
b
u
u
r
r
u
b
k
w
i
7
e
fau
cmk
nzs
by
wx
tjmok
tjmok
wx
by
nzs
cmk
fau
e
6
klrj
we
klrj
we
we
we
we
klrj
8
zncybqmh
aeebef
zncybqmh
n
aeebef
zncybqmh
zncybqmh
zncybqmh
zncybqmh
aeebef
n
30
kqqcbs
vap
kymomn
j
kqqcbs
fuzlzoum
kymomn
dbh
fuzlzoum
kymomn
vap
vlgzs
dbh
vlgzs
bvy
dbh
kymomn
kymomn
eoqql
kymomn
kymomn
kqqcbs
vlgzs
kqqcbs
kqqcbs
fuzlzoum
vlgzs
rylgdoo
vlgzs
rylgdoo
rylgdoo
vlgzs
fuzlzoum
kqqcbs
kymomn
eoqql
dbh
bvy
v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aaaaa
aaaa
aaaaaa
aa
aaaa
aaaa
aaaaaa
a
aaa
aaaaaaaa
aa
aa
aaaaaaaa
aaa
a
aaaaaa
aaaa
aaaaa
3
a
aa
aaa
aaa
aa
a
9
zzz
zzzzz
zzz
zzzz
zz
zzzz
zzzzz
zzzz
zzzzzzz
zzzzzzz
zzzz
zzzzz
zz
zzz
def chatorder():
    dici = {}
    n = int(input())
    for i in range(n):
        dici[input()] = i
    saida = [(key) for (key) in sorted(dici.items(), key=lambda x: x[1])]
    for j in range(len(saida) - 1, -1, -1):
        print(saida[j][0])


chatorder()

	  						   		     			   	   		