#K70827. Extract Unique Numbers

    ID: 33395 Type: Default 1000ms 256MiB

Extract Unique Numbers

Extract Unique Numbers

This problem requires you to extract all the unique numbers from a list of comma-separated integer strings. A number is considered unique if it appears exactly once across all the provided strings. You need to process these strings, count the occurrences of each integer, and output the unique integers in ascending order. In mathematical notation, if the occurrence of an integer \(x\) is denoted by \(f(x)\), then you need to output all \(x\) such that \(f(x)=1\).

inputFormat

The first line contains an integer \(n\) representing the number of strings. Each of the following \(n\) lines contains a comma-separated list of positive integers.

outputFormat

Output the unique integers (those that appear exactly once) in ascending order, separated by a single space. If there are no unique integers, output an empty line.

## sample
4
1,2,3,4
2,3,5
5,6,7
8,9,8
1 4 6 7 9