import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();   // number of elements
        int[] arr = new int[n];
        // Read input values
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
            if (arr[i] < 0) {   // check negative
                System.out.println("Invalid input");
                return;
            }
        }
        Set<Integer> seen = new HashSet<>();
        Set<Integer> duplicates = new LinkedHashSet<>();
        // Find duplicates
        for (int num : arr) {
            if (!seen.add(num)) { 
                duplicates.add(num); // already seen → duplicate
            }
        }
        if (duplicates.isEmpty()) {
            System.out.println("No duplicates found.");
        } else {
            for (int d : duplicates) {
                System.out.println(d);
            }
        }
    }
}