Remove Duplicates

MediumGrade 12

Read an array and print only the unique values, in the order they first appeared, space-separated.

Input / Output

Input: first line N, second line N space-separated integers. Output: unique values, in first-seen order, space-separated.

Examples

Input

6
1 2 2 3 1 4

Expected Output

1 2 3 4

Input

5
5 5 5 5 5

Expected Output

5

+ 2 hidden tests checked on Submit.

Files

Main.java is the entry point. Add extra classes for OOP exercises — they compile together.

Main.java
Loading...

Run your code to see test results here.