Problems
Fashion Elements 2
Fashion Elements 2
An array of integers is given. Print only those elements that are repeated several times. That is, the numbers that occur once are not displayed at all, and from several identical elements in the array, select the one with the highest index. If such elements do not exist, print NO.
Input data
First line contains number n. Next line contains n integers. All numbers do not exceed 100 by absolute value.
Output data
Print in one line the repeated elements in array.
Examples
Input example #1
7 0 1 -2 1 0 0 3
Output example #1
1 0
Input example #5
10 -2 3 3 -3 -4 0 2 -3 -4 3
Output example #5
-3 -4 3
Input example #7
17 1 -3 -2 7 -7 5 1 0 1 -7 2 3 3 -2 5 1 -3
Output example #7
-7 3 -2 5 1 -3