n,k=map(int,input().split());s=input();print(*[s[i] if k-1!=i else s[i].lower() for i in range(n)],sep='')

n,k=list(map(int,input().split()));s=eval(input());print((s[:k-1]+s[k-1].lower()+s[k:]))
n, k = map(int, input().split())
s = input()
print(*[s[i] if k - 1 != i else s[i].lower() for i in range(n)], sep="")

n, k = list(map(int, input().split()))
s = eval(input())
print((s[: k - 1] + s[k - 1].lower() + s[k:]))

-n, k = map(int, input().split()) -s = input() -print(*[s[i] if k - 1 != i else s[i].lower() for i in range(n)], sep="") +n, k = list(map(int, input().split())) +s = eval(input()) +print((s[: k - 1] + s[k - 1].lower() + s[k:]))