import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        // Constraint check for n
        if (n < 0) {
            System.out.println("Invalid input");
            return;
        }

        ArrayList<Integer> arr = new ArrayList<>();
        boolean hasNegative = false;

        for (int i = 0; i < n; i++) {
            int val = sc.nextInt();
            if (val < 0) {
                hasNegative = true;
            }
            arr.add(val);
        }

        // If negative integers exist → invalid input
        if (hasNegative) {
            System.out.println("Invalid input");
            return;
        }

        ArrayList<Integer> duplicates = new ArrayList<>();

        // Find duplicates in order of appearance
        for (int i = 0; i < arr.size(); i++) {
            int current = arr.get(i);

            // Check if it appears again later
            if (arr.subList(i + 1, arr.size()).contains(current)) {
                // Add to duplicates only if not already added
                if (!duplicates.contains(current)) {
                    duplicates.add(current);
                }
            }
        }

        if (duplicates.isEmpty()) {
            System.out.println("No duplicates found");
        } else {
            for (int d : duplicates) {
                System.out.println(d);
            }
        }
    }
}
