import java.util.*;

public class DuplicateFinder {
    public static void main(String[] args) {
        // Input reading from the user
        Scanner scanner = new Scanner(System.in);
        
        // Read the number of elements (n)
        int n = scanner.nextInt();
        
        // Validate if n is within the valid range
        if (n < 1 || n > Math.pow(10, 5)) { // based on typical constraints, assuming 1 ≤ n ≤ 10^5
            System.out.println("Invalid input");
            return;
        }
        
        // Read the array elements
        int[] inputArray = new int[n];
        
        // To check if any input number is out of valid range
        for (int i = 0; i < n; i++) {
            inputArray[i] = scanner.nextInt();
            if (inputArray[i] < -Math.pow(10, 9) || inputArray[i] > Math.pow(10, 9)) {
                System.out.println("Invalid input");
                return;
            }
        }
        
        // Call function to find duplicates
        findDuplicates(inputArray);
    }

    public static void findDuplicates(int[] arr) {
        // Set to track seen elements
        Set<Integer> seen = new HashSet<>();
        // List to store duplicates in the order they appear
        List<Integer> duplicates = new ArrayList<>();
        
        // Iterate over the array and detect duplicates
        for (int num : arr) {
            if (seen.contains(num) && !duplicates.contains(num)) {
                duplicates.add(num);
            } else {
                seen.add(num);
            }
        }
        
        // If no duplicates found, print the message
        if (duplicates.isEmpty()) {
            System.out.println("No duplicates found");
        } else {
            // Print duplicates in the order they appear
            for (int duplicate : duplicates) {
                System.out.println(duplicate);
            }
        }
    }
}
