633. Unique Array

0

Easy

You have a strong aversion to repeated numbers. Your goal is to eliminate all duplicate elements in the given array. Given an integer array sorted in **non-decreasing** order, modify the array in-place to only include unique elements. The relative order of the elements should remain unchanged.

Input Format

The first line contains an integer **N** representing the size of the array.
The second line contains the integer array.

Output Format

Print the modified array.

Example

Input

7 1 2 2 3 4 4 5

Output

1 2 3 4 5

Constraints

1 <= N <= 104
0 <= Arr[i] <= 104
Loading...

View Submissions

Console