import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); String [] s = new String[n]; String [] t = new String[n]; for( int i = 0; i < n; i++ ){ s[i] = sc.next(); } for( int i = 0; i < n; i++ ){ t[i] = sc.next(); } for( int i = 0; i < n; i++ ){ if( !s[i] .equals(t[i])){ System.out.println(i+1); System.out.println(s[i]); System.out.println(t[i]); } } sc.close(); } }