import sys
import math
sys.setrecursionlimit(10**6)
from collections import defaultdict

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

ans=s[:k-1]+s[k-1].lower()+s[k:]
print(ans) import sys sys import math math sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 from collections import defaultdict n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s=input() s input() input ans=s[:k-1]+s[k-1].lower()+s[k:] ans s[:k-1]+s[k-1].lower()+s[k:] s[:k-1]+s[k-1].lower() s[:k-1] s :k-1 k-1 k 1 s[k-1].lower() [k-1].lower [k-1] s k-1 k 1 lower s[k:] s k: k print(ans) print ans s=input() input() s k=map(int,input().split()) map(int,input().split()) k n,k=map(int,input().split()) map(int,input().split()) n ans=s[:k-1]+s[k-1].lower()+s[k:] s[:k-1]+s[k-1].lower()+s[k:] ans
import sys
import math
sys.setrecursionlimit(10**6)
from collections import defaultdict

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

ans=s[:k-1]+s[k-1].lower()+s[k:]
print(ans)
