def resolve():
    N, K = map(int, input().split())
    S = input()
    print(S[:K-1]+str.lower(S[K-1])+S[K:N])
resolve() def resolve():
    N, K = map(int, input().split())
    S = input()
    print(S[:K-1]+str.lower(S[K-1])+S[K:N]) resolve N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K S = input() S input() input print(S[:K-1]+str.lower(S[K-1])+S[K:N]) print S[:K-1]+str.lower(S[K-1])+S[K:N] S[:K-1]+str.lower(S[K-1]) S[:K-1] S :K-1 K-1 K 1 str.lower(S[K-1]) str.lower str lower S[K-1] S K-1 K 1 S[K:N] S K:N K N resolve() resolve def resolve():
    N, K = map(int, input().split())
    S = input()
    print(S[:K-1]+str.lower(S[K-1])+S[K:N]) def resolve():
    N, K = map(int, input().split())
    S = input()
    print(S[:K-1]+str.lower(S[K-1])+S[K:N]) resolve
def resolve():
    N, K = map(int, input().split())
    S = input()
    print(S[:K-1]+str.lower(S[K-1])+S[K:N])
resolve()