N = int(input()) S = input() X, N = map(str, input().split()) print(S[: int(X) - 1] + N + S[int(X) :])