import sys input = sys.stdin.readline N=int(input()) S=list(input().strip()) X,c=input().split() S[int(X)-1]=c print("".join(S))