#include #include #include #include #include #include #include #include #define AS(a) (sizeof(a)/sizeof(a[0])) using namespace std; long long int MOD = 1000000007; long long int INF = 1000000007; int main() { int N; cin >> N; string S[N]; string T[N]; for(int i = 0; i < N; i++) { cin >> S[i]; } for(int i = 0; i < N; i++) { cin >> T[i]; } for(int i = 0; i < N; i++) { if(S[i].length() != T[i].length()) { cout << (i+1) << endl; cout << S[i] << endl; cout << T[i] << endl; break; } for(int j = 0; j < S[i].length(); j++) { if(S[i][j] != T[i][j]) { cout << (i+1) << endl; cout << S[i] << endl; cout << T[i] << endl; return 0; } } } }