#include<bits/stdc++.h>
n,k=map(int,input().split())
s=input()
c=""
for i in range(n):
  if i==k-1:
    c+=s[i].lower()
  else:
    c+=s[i]
print(c); n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s=input() s input() input c="" c "" for i in range(n):
  if i==k-1:
    c+=s[i].lower()
  else:
    c+=s[i] i range(n) range n if i==k-1:
    c+=s[i].lower()
  else:
    c+=s[i] i==k-1 i k-1 k 1 c+=s[i].lower() c s[i].lower() [i].lower [i] s i lower c+=s[i] c s[i] s i print(c) print c c+=s[i] s[i] c c="" "" c s=input() input() s n,k=map(int,input().split()) map(int,input().split()) n k=map(int,input().split()) map(int,input().split()) k c+=s[i].lower() s[i].lower() c
#include<bits/stdc++.h>
n,k=map(int,input().split())
s=input()
c=""
for i in range(n):
  if i==k-1:
    c+=s[i].lower()
  else:
    c+=s[i]
print(c);