N=int(input()) S=list(input()) a, b = map(str, input().split()) a = int(a) S[a-1]=b print("".join(S))