package yukicoder; import java.util.Scanner; public class No547 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String tmp; String[] s; int n = sc.nextInt(); s = new String[n]; for(int i = 0; i < n; i++) { s[i] = sc.next(); } int resultNum = 0; String resultS = null, resultT = null; for(int i = 0; i < n; i++) { tmp = sc.next(); if( !s[i].equals(tmp) ) { resultNum = i + 1; resultS = s[i]; resultT = tmp; } } System.out.println(resultNum); System.out.println(resultS); System.out.println(resultT); } }