#include using namespace std; //-------------------------------------------- #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define LL long long #define INF INT_MAX/3 //-------------------------------------------- const double EPS = 1e-14; const double PI = acos(-1.0); //-------------------------------------------- int main(){ int n; scanf("%d",&n); string sa,sb; vector a,b; REP (i, n) { cin >> sa; a.push_back(sa); } REP (i, n) { cin >> sb; b.push_back(sb); } REP (i, n) { if (a.at(i) != b.at(i)) { cout << i + 1 << "\n" << a.at(i) << "\n" << b.at(i) << "\n"; } } }