import java.io.*; import java.util.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner in=new Scanner(System.in); int q=in.nextInt(); for(int i=0;i set = new HashSet(); Set set2 = new HashSet(); int flag=1,count1=0,count2=0; for(int j=0;j