n, k = map(int, input().split())
s = input()
for i in range(n):
    if i==k-1:
        print(s[i].lower(), end='')
    else:
        print(s[i], end='')
print() 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==k-1:
        print(s[i].lower(), end='')
    else:
        print(s[i], end='') i range(n) range n if i==k-1:
        print(s[i].lower(), end='')
    else:
        print(s[i], end='') i==k-1 i k-1 k 1 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 '' print() print n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k s = input() input() s
n, k = map(int, input().split())
s = input()
for i in range(n):
    if i==k-1:
        print(s[i].lower(), end='')
    else:
        print(s[i], end='')
print()