N, K = [int(i) for i in input().split()]

S = eval(input())

ans = S[:K - 1] + S[K - 1].lower() + S[K:]

print(ans)
N, K = [int(i) for i in input().split()]

S = eval(input())

print((S[:K - 1] + S[K - 1].lower() + S[K:]))
N, K = [int(i) for i in input().split()]
S = eval(input())
ans = S[: K - 1] + S[K - 1].lower() + S[K:]
print(ans)

N, K = [int(i) for i in input().split()]
S = eval(input())
print((S[: K - 1] + S[K - 1].lower() + S[K:]))

-ans = S[: K - 1] + S[K - 1].lower() + S[K:] -print(ans) +print((S[: K - 1] + S[K - 1].lower() + S[K:]))