Problems
Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates such that each element appears only once.
\InputFile
The first line contains the size $n~(1 \le n \le 100)$ of array. The second line gives $n$ integers in sorted order, each number is no greater than $100$ by absolute value.
\OutputFile
Print the sorted array with removed duplicates.
Input example #1
9 -2 -2 0 1 1 2 4 4 5
Output example #1
-2 0 1 2 4 5
Input example #2
8 6 6 6 7 7 8 9 10
Output example #2
6 7 8 9 10