Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EIUPH011 - First occurrence

Given a sequence of n positive integers, output the numbers in the given order provided that the values occur more than once, then output only the first occurrence of it.

Input

 

The first line is an integer n (n <= 104).
The second line is n positive integers representing the values in the given sequence.

The first line is an integer n (n <= 104).

The second line is n positive integers representing the values in the given sequence.

 

Output

A single line contains the the first occurrence of each value.

Example

Input:
5
1 2 3 3 2
Output: 1 2 3

Added by:Ha Minh Ngoc
Date:2015-01-28
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NCSHARP GOSU JULIA PYPY3
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.