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