#include "bits/stdc++.h" using namespace std; using ll = long long; using IP = pair; #define INF 999999999 #define atcoder(int)1e9+7 #define Endl endl int main() { int n; string a[100],b[100]; cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) cin >> b[i]; for (int i = 0; i < n; i++) { if (a[i] != b[i]) cout << i + 1 << endl << a[i] << endl<< b[i] << endl; } return 0; }