# 初期入力
import sys
input = sys.stdin.readline
N,K = (int(x) for x in input().split())
S =input().strip()
S_small=S.lower()
ans =S[:K-1] +S_small[K-1] +S[K:]
print(ans) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N,K = (int(x) for x in input().split()) N (int(x) for x in input().split()) K S =input().strip() S input().strip() ().strip () input strip S_small=S.lower() S_small S.lower() S.lower S lower ans =S[:K-1] +S_small[K-1] +S[K:] ans S[:K-1] +S_small[K-1] +S[K:] S[:K-1] +S_small[K-1] S[:K-1] S :K-1 K-1 K 1 S_small[K-1] S_small K-1 K 1 S[K:] S K: K print(ans) print ans S =input().strip() input().strip() S ans =S[:K-1] +S_small[K-1] +S[K:] S[:K-1] +S_small[K-1] +S[K:] ans input = sys.stdin.readline sys.stdin.readline input S_small=S.lower() S.lower() S_small N,K = (int(x) for x in input().split()) (int(x) for x in input().split()) N K = (int(x) for x in input().split()) (int(x) for x in input().split()) K
# 初期入力
import sys
input = sys.stdin.readline
N,K = (int(x) for x in input().split())
S =input().strip()
S_small=S.lower()
ans =S[:K-1] +S_small[K-1] +S[K:]
print(ans)