Without repetition 2#8973

Without repetition 2

1 second
64 megabytes
Very easy

From the provided array of integers, remove all duplicate elements, ensuring that only the element with the highest index is retained.

Input

The first line contains the integer , representing the number of elements in the array. The second line contains integers, each with an absolute value not exceeding .

Output

Print the array elements without duplicates in a single line, maintaining their original order, and separate them with spaces.

Examples

Example 1

Loading
Loading