#include #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; using ll = long long ; using P = pair ; using pll = pair; constexpr int INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 1000000007; int main(){ int n; cin >> n; vector s(n),t(n); int id = 0; string anss,anst; rep(i,n) cin >> s[i]; rep(i,n) cin >> t[i]; rep(i,n){ if(s[i]!=t[i]){ id = i; anss = s[i]; anst = t[i]; } } cout << id+1 << endl; cout << anss << endl; cout << anst << endl; return 0; }