# VOTERS: I get a wrong answer, sample input works fine. Please let me know of any tricky test case I may be missing. Thanks in advance.

import java.util.;
import java.lang.
;

``````class VOTERS{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int N1 = scanner.nextInt();  // number of voters in first list
int N2 = scanner.nextInt();  //  "     "   "     "  second "
int N3 = scanner.nextInt();  //  "     "   "     "  third "

int[] firstList = new int[N1];
int[] secondList = new int[N2];
int[] thirdList = new int[N3];
for(int i=0;i<N1;i++){
firstList[i] = scanner.nextInt();
}
for(int i=0;i<N2;i++){
secondList[i] = scanner.nextInt();
}
for(int i=0;i<N3;i++){
thirdList[i] = scanner.nextInt();
}
HashMap<Integer, Integer> countMap = new HashMap<Integer, Integer>();
for(int i=0;i<N1;i++){
if(countMap.containsKey(firstList[i])){
countMap.put(firstList[i], countMap.get(firstList[i]) + 1);
}
else{
countMap.put(firstList[i], 1);
}
}
for(int i=0;i<N2;i++){
if(countMap.containsKey(secondList[i])){
countMap.put(secondList[i], countMap.get(secondList[i]) + 1);
}
else{
countMap.put(secondList[i], 1);
}
}
for(int i=0;i<N3;i++){
if(countMap.containsKey(thirdList[i])){
countMap.put(thirdList[i], countMap.get(thirdList[i]) + 1);
}
else{
countMap.put(thirdList[i], 1);
}
}
ArrayList<Integer> result = new ArrayList<Integer>();
for(Map.Entry<Integer, Integer> entry : countMap.entrySet()){
if(entry.getValue() > 1){