# hello worldと表示する a=int(input()) b=input().split() c=[] for i in range(0,a)[::-1]: if b[i] not in c: c.append(b[i])