On the first line you are given the length of two sets n and m. On the next n + m lines there are n numbers that are in the first set and m numbers that are in the second one. Find all non-repeating element that appears in both of them, and print them at the console:
Set with length n = 4: {1, 3, 5, 7}
Set with length m = 3: {3, 4, 5}
Set that contains all repeating elements -> {3, 5}
Examples:
Input
|
Output
|
4 3
1
3
5
7
3
4
5
|
3 5
|
2 2
1
3
1
5
|
1
|