n,k=map(int, input().split())
s=input()
if s[k-1]=='A':
  s=s[:k-1]+'a'+s[k:]
if s[k-1]=='B':
  s=s[:k-1]+'b'+s[k:]
if s[k-1]=='C':
  s=s[:k-1]+'c'+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 s[k-1]=='A':
  s=s[:k-1]+'a'+s[k:] s[k-1]=='A' s[k-1] s k-1 k 1 'A' s=s[:k-1]+'a'+s[k:] s s[:k-1]+'a'+s[k:] s[:k-1]+'a' s[:k-1] s :k-1 k-1 k 1 'a' s[k:] s k: k if s[k-1]=='B':
  s=s[:k-1]+'b'+s[k:] s[k-1]=='B' s[k-1] s k-1 k 1 'B' s=s[:k-1]+'b'+s[k:] s s[:k-1]+'b'+s[k:] s[:k-1]+'b' s[:k-1] s :k-1 k-1 k 1 'b' s[k:] s k: k if s[k-1]=='C':
  s=s[:k-1]+'c'+s[k:] s[k-1]=='C' s[k-1] s k-1 k 1 'C' s=s[:k-1]+'c'+s[k:] s s[:k-1]+'c'+s[k:] s[:k-1]+'c' s[:k-1] s :k-1 k-1 k 1 'c' s[k:] s k: k print(s) print s n,k=map(int, input().split()) map(int, input().split()) n s=s[:k-1]+'a'+s[k:] s[:k-1]+'a'+s[k:] s s=s[:k-1]+'c'+s[k:] s[:k-1]+'c'+s[k:] s s=input() input() s s=s[:k-1]+'b'+s[k:] s[:k-1]+'b'+s[k:] s k=map(int, input().split()) map(int, input().split()) k
n,k=map(int, input().split())
s=input()
if s[k-1]=='A':
  s=s[:k-1]+'a'+s[k:]
if s[k-1]=='B':
  s=s[:k-1]+'b'+s[k:]
if s[k-1]=='C':
  s=s[:k-1]+'c'+s[k:]
print(s)