#include int main (void){ int N; char S[10][21],T[10][21]; // [10: N] [21: 最大文字数+1] scanf("%d",&N); for(int k = 0; k < N; k++){ scanf("%s",S[k]); } for(int l = 0; l < N; l++){ scanf("%s",T[l]); } for(int i = 0; i < N; i++){ for(int j = 0; S[i][j] != 0; j++){ if(S[i][j] != T[i][j]){ printf("%d\n%s\n%s\n",i+1,S[i],T[i]); return 0; } } } return 0; }