N, K = map(int,input().split())
S = input()


if K == 1:
  s = S[0].lower() + S[1:]
elif K == N:
  s = S[:-1] + S[-1].lower()
else:
  s = S[:K-1] + S[K-1].lower() + S[K:]

print(s)
 N, K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K S = input() S input() input if K == 1:
  s = S[0].lower() + S[1:]
elif K == N:
  s = S[:-1] + S[-1].lower()
else:
  s = S[:K-1] + S[K-1].lower() + S[K:] K == 1 K 1 s = S[0].lower() + S[1:] s S[0].lower() + S[1:] S[0].lower() [0].lower [0] S 0 lower S[1:] S 1: 1 elif K == N:
  s = S[:-1] + S[-1].lower() K == N K N s = S[:-1] + S[-1].lower() s S[:-1] + S[-1].lower() S[:-1] S :-1 -1 S[-1].lower() [-1].lower [-1] S -1 lower s = S[:K-1] + S[K-1].lower() + S[K:] s 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(s) print s s = S[:K-1] + S[K-1].lower() + S[K:] S[:K-1] + S[K-1].lower() + S[K:] s N, K = map(int,input().split()) map(int,input().split()) N K = map(int,input().split()) map(int,input().split()) K S = input() input() S s = S[0].lower() + S[1:] S[0].lower() + S[1:] s s = S[:-1] + S[-1].lower() S[:-1] + S[-1].lower() s
N, K = map(int,input().split())
S = input()


if K == 1:
  s = S[0].lower() + S[1:]
elif K == N:
  s = S[:-1] + S[-1].lower()
else:
  s = S[:K-1] + S[K-1].lower() + S[K:]

print(s)

