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