#C13712. Unique Elements Finder

    ID: 43281 Type: Default 1000ms 256MiB

Unique Elements Finder

Unique Elements Finder

You are given a list of integers. Your task is to extract and print the elements that occur exactly once in the list, while preserving the order of their appearance.

More formally, if the input list is \( A = [a_1, a_2, \dots, a_n] \), you should output a list \( B \) containing those elements \( a_i \) such that the frequency of \( a_i \) in \( A \) is 1. The order of elements in \( B \) must be the same as in \( A \).

If no element appears exactly once, output an empty line.

inputFormat

The first line contains an integer \( n \) (where \( 0 \le n \le 10^5 \)) representing the number of elements in the list.

The second line contains \( n \) space-separated integers.

outputFormat

Print the unique elements in their original order separated by a single space. If there are no unique elements, print an empty line.

## sample
5
1 2 3 4 5
1 2 3 4 5