#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector s(n); for(int i = 0; i < n; i++) { cin >> s[i]; } for(int i = 0; i < n; i++) { string t; cin >> t; if(t == s[i]) continue; cout << i + 1 << endl << s[i] << endl << t << endl; } return 0; }