import java.util.Scanner; public class Test2 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String[] str = new String[n]; int[] l = new int[n]; int[] r = new int[n]; for(int i = 0;i < n;i++...