Fashion Elements 2#8974

Fashion Elements 2

1 segundo
128 megabytes
Muy fácil

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.

Entrada

First line contains number . Next line contains integers. All numbers do not exceed by absolute value.

Salida

Print in one line the repeated elements in array.

Ejemplos

Ejemplo 1

Loading
Loading

Ejemplo 5

Loading
Loading

Ejemplo 7

Loading
Loading