N = int(input()) S = list(input()) X, C = input().split() X = int(X)-1 S[X] = C print("".join(S))