package m.shin; import java.util.Scanner; public class Con547 { public static void main(String[] args) { Scanner s = new Scanner(System.in); int N = s.nextInt(); String[] S = new String[N]; for(int i = 0;i < N;i++){ S[i] = s.next(); } for(int i = 0;i < N;i++){ String str = s.next(); if(!str.equals(S[i])){ System.out.println(i+1); System.out.println(S[i]); System.out.println(str); } } s.close(); } }