import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        if (n <= 0) {   // ✅ handle 0 or negative n
            System.out.println("No duplicates found");
            return;
        }

        int[] arr = new int[n];

        // input + check for negatives
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
            if (arr[i] < 0) {
                System.out.println("Invalid input");
                return;
            }
        }

        ArrayList<Integer> list = new ArrayList<>();
        HashSet<Integer> seen = new HashSet<>();
        HashSet<Integer> duplicates = new HashSet<>();

        // detect duplicates in original order
        for (int i = 0; i < n; i++) {
            if (seen.contains(arr[i]) && !duplicates.contains(arr[i])) {
                list.add(arr[i]);
                duplicates.add(arr[i]);
            }
            seen.add(arr[i]);
        }

        // output
        if (list.isEmpty()) {
            System.out.println("No duplicates found");
        } else {
            for (int x : list) {
                System.out.println(x);
            }
        }
    }
}
