#C11050. Unique Sorted Even Numbers

    ID: 40324 Type: Default 1000ms 256MiB

Unique Sorted Even Numbers

Unique Sorted Even Numbers

You are given an integer \( n \) and a list of \( n \) integers. Your task is to output all the unique even numbers from the list in ascending order.

Input Format: The first line contains an integer \( n \). The second line contains \( n \) integers separated by spaces.

Output Format: Print the unique even numbers in ascending order separated by a single space. If there are no even numbers, output nothing.

Example:

Input:
5
1 2 3 4 4

Output: 2 4

</p>

Make sure your solution reads from standard input and prints to standard output.

inputFormat

The input consists of two lines:

  1. The first line contains an integer n, representing the number of elements in the list.
  2. The second line contains n space-separated integers.

outputFormat

Print a single line containing the unique even numbers from the input list in ascending order separated by a single space. If there are no even numbers, print an empty line.## sample

5
1 2 3 4 4
2 4