#include #include using namespace std; int main() { int N; string S[10], T[10]; cin >> N; for (int s = 0; s < N; s++) { cin >> S[s]; } for (int t = 0; t < N; t++) { cin >> T[t]; } int nod; for (nod = 0; nod < N; nod++) { if (S[nod] != T[nod]) { break; } } cout << ++nod << endl << S[nod--] << endl<< T[nod++] << endl; }