Problem

17 /21


*Select recurring

Problem

Given an array of numbers. It is necessary to select into another array all elements of the original array that occur more than once.

Input
The first line contains the size of the N array. The second line contains space-separated N numbers – array elements ai (-109<=ai<=109< /sup>). It is guaranteed that 0 < N

Imprint
The program should display in one line, separated by a space, all the elements of the source array that occur more than once, in the same order as they occur in the first array. If there are none, print the number 0.
 
Examples
# Input Output
1 6
4 1 2 1 2 3
1 2