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