import java.util.Scanner; import java.util.Arrays; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int sc1 = Integer.parseInt(sc.nextLine()); String str = sc.nextLine(); int sc2 = Integer.parseInt(sc.nextLine()); String[] arr1 = str.split(" "); int[] a...