n,k = map(int,input().split())
s = list(input())
ans = ''

if s[k-1] == 'A':
  s[k-1] = 'a'
elif s[k-1] == 'B':
  s[k-1] = 'b'
else:
  s[k-1] = 'c'
  
for i in s:
  ans += i
  
print(ans) n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k s = list(input()) s list(input()) list input() input ans = '' ans '' if s[k-1] == 'A':
  s[k-1] = 'a'
elif s[k-1] == 'B':
  s[k-1] = 'b'
else:
  s[k-1] = 'c'
   s[k-1] == 'A' s[k-1] s k-1 k 1 'A' s[k-1] = 'a' s[k-1] s k-1 k 1 'a' elif s[k-1] == 'B':
  s[k-1] = 'b' s[k-1] == 'B' s[k-1] s k-1 k 1 'B' s[k-1] = 'b' s[k-1] s k-1 k 1 'b' s[k-1] = 'c' s[k-1] s k-1 k 1 'c' for i in s:
  ans += i
   i s ans += i ans i print(ans) print ans s = list(input()) list(input()) s k = map(int,input().split()) map(int,input().split()) k ans = '' '' ans n,k = map(int,input().split()) map(int,input().split()) n ans += i i ans
n,k = map(int,input().split())
s = list(input())
ans = ''

if s[k-1] == 'A':
  s[k-1] = 'a'
elif s[k-1] == 'B':
  s[k-1] = 'b'
else:
  s[k-1] = 'c'
  
for i in s:
  ans += i
  
print(ans)