#include using namespace std; typedef long long ll; int main() { int n; cin >> n; string s[2*n]; for (int i = 0; i < 2*n; i++) cin >> s[i]; for (int i = 0; i < n; i++) if (s[i] != s[i+n]) cout << i+1 << endl << s[i] << endl << s[i+n] << endl; return 0; }