public class Main{ public static void main(String[]args){ Scanner scan=new Scanner(System.in); while(scan.hasNext()){ int n=scan.nextInt(); int[]arr=new int[3*n]; for(int i=0;i<arr.length;i++){ arr[i]=scan.nextInt(); ...