IntermediateRating 1200
Common to Three Lists
Three sorted lists are given. Print the values present in all three (each once), or -1.
Input
Three lines of sorted integers.
Output
One line.
Sample 1
Input
1 5 10 20 40 80 6 7 20 80 100 3 4 15 20 30 70 80 120
Output
20 80
Sample 2
Input
1 2 3 4 5 6
Output
-1
Output appears here