N=int(input()) S=input() X,C=input().split() for i in range(N): if i==int(X)-1: print(C,end="") else: print(S[i],end="")