def main(): n = int(input()) S = input() x, c = list(map(str, input().split())) x = int(x)-1 return S[:x] + c + S[x+1:] print(main())