import sys readline=sys.stdin.readline import datetime N=int(readline()) S=readline().rstrip().split() T=readline().rstrip().split() for ans,(s,t) in enumerate(zip(S,T),1): if s!=t: print(ans) print(s) print(t)