#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

n, k = map(int, input().split())
s = input()

for i in range(n):
    if i+1 == k:
        print(s[i].lower(), end="")
    else:
        print(s[i], end="")
 n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k s = input() s input() input for i in range(n):
    if i+1 == k:
        print(s[i].lower(), end="")
    else:
        print(s[i], end="") i range(n) range n if i+1 == k:
        print(s[i].lower(), end="")
    else:
        print(s[i], end="") i+1 == k i+1 i 1 k print(s[i].lower(), end="") print s[i].lower() [i].lower [i] s i lower end="" end "" print(s[i], end="") print s[i] s i end="" end "" k = map(int, input().split()) map(int, input().split()) k s = input() input() s n, k = map(int, input().split()) map(int, input().split()) n
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

n, k = map(int, input().split())
s = input()

for i in range(n):
    if i+1 == k:
        print(s[i].lower(), end="")
    else:
        print(s[i], end="")

