n,k = map(int,input().split())
s = input()
ss = s.lower()
ans = ""
for i in range(n):
  ans += ss[i] if i == k-1 else s[i]


print(ans) n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s = input() s input() input ss = s.lower() ss s.lower() s.lower s lower ans = "" ans "" for i in range(n):
  ans += ss[i] if i == k-1 else s[i] i range(n) range n ans += ss[i] if i == k-1 else s[i] ans ss[i] if i == k-1 else s[i] i == k-1 i k-1 k 1 ss[i] ss i s[i] s i print(ans) print ans s = input() input() s ans += ss[i] if i == k-1 else s[i] ss[i] if i == k-1 else s[i] ans ans = "" "" ans k = map(int,input().split()) map(int,input().split()) k ss = s.lower() s.lower() ss n,k = map(int,input().split()) map(int,input().split()) n
n,k = map(int,input().split())
s = input()
ss = s.lower()
ans = ""
for i in range(n):
  ans += ss[i] if i == k-1 else s[i]


print(ans)