N, K = list(map(int,input().split()))
S = input()
ls = list(S)
if ls[K-1] == 'A':
  ls[K-1] = 'a'
elif ls[K-1] == 'B':
  ls[K-1] = 'b'
elif ls[K-1] == 'C':
  ls[K-1] = 'c'
print(''.join(ls)) N, K = list(map(int,input().split())) N list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split K S = input() S input() input ls = list(S) ls list(S) list S if ls[K-1] == 'A':
  ls[K-1] = 'a'
elif ls[K-1] == 'B':
  ls[K-1] = 'b'
elif ls[K-1] == 'C':
  ls[K-1] = 'c' ls[K-1] == 'A' ls[K-1] ls K-1 K 1 'A' ls[K-1] = 'a' ls[K-1] ls K-1 K 1 'a' elif ls[K-1] == 'B':
  ls[K-1] = 'b' ls[K-1] == 'B' ls[K-1] ls K-1 K 1 'B' ls[K-1] = 'b' ls[K-1] ls K-1 K 1 'b' elif ls[K-1] == 'C':
  ls[K-1] = 'c' ls[K-1] == 'C' ls[K-1] ls K-1 K 1 'C' ls[K-1] = 'c' ls[K-1] ls K-1 K 1 'c' print(''.join(ls)) print ''.join(ls) ''.join '' join ls N, K = list(map(int,input().split())) list(map(int,input().split())) N K = list(map(int,input().split())) list(map(int,input().split())) K ls = list(S) list(S) ls S = input() input() S
N, K = list(map(int,input().split()))
S = input()
ls = list(S)
if ls[K-1] == 'A':
  ls[K-1] = 'a'
elif ls[K-1] == 'B':
  ls[K-1] = 'b'
elif ls[K-1] == 'C':
  ls[K-1] = 'c'
print(''.join(ls))