N, K = map(int, input().split())
S = input()
ret = ""
for i,s in enumerate(S):
    if i+1==K:
        ret += str.lower(s)
    else:
        ret += s
print(ret) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K S = input() S input() input ret = "" ret "" for i,s in enumerate(S):
    if i+1==K:
        ret += str.lower(s)
    else:
        ret += s i s enumerate(S) enumerate S if i+1==K:
        ret += str.lower(s)
    else:
        ret += s i+1==K i+1 i 1 K ret += str.lower(s) ret str.lower(s) str.lower str lower s ret += s ret s print(ret) print ret N, K = map(int, input().split()) map(int, input().split()) N S = input() input() S K = map(int, input().split()) map(int, input().split()) K ret += str.lower(s) str.lower(s) ret ret = "" "" ret ret += s s ret
N, K = map(int, input().split())
S = input()
ret = ""
for i,s in enumerate(S):
    if i+1==K:
        ret += str.lower(s)
    else:
        ret += s
print(ret)