n,k = map(int,input().split())
s = input()
sl = []
for i in range(n):
    if i+1 == k:
        sl.append(s[i].lower())
    else:
        sl.append(s[i])
print(''.join(sl)) n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s = input() s input() input sl = [] sl [] for i in range(n):
    if i+1 == k:
        sl.append(s[i].lower())
    else:
        sl.append(s[i]) i range(n) range n if i+1 == k:
        sl.append(s[i].lower())
    else:
        sl.append(s[i]) i+1 == k i+1 i 1 k sl.append(s[i].lower()) sl.append sl append s[i].lower() [i].lower [i] s i lower sl.append(s[i]) sl.append sl append s[i] s i print(''.join(sl)) print ''.join(sl) ''.join '' join sl n,k = map(int,input().split()) map(int,input().split()) n sl = [] [] sl s = input() input() s k = map(int,input().split()) map(int,input().split()) k
n,k = map(int,input().split())
s = input()
sl = []
for i in range(n):
    if i+1 == k:
        sl.append(s[i].lower())
    else:
        sl.append(s[i])
print(''.join(sl))