N,K=map(int,input().split())
S=input()
S2=S.lower()
S3=''

for i in range(N):
  if i==K-1:
    S3+=S2[i]
  else:
    S3+=S[i]
    
print(S3) N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K S=input() S input() input S2=S.lower() S2 S.lower() S.lower S lower S3='' S3 '' for i in range(N):
  if i==K-1:
    S3+=S2[i]
  else:
    S3+=S[i]
     i range(N) range N if i==K-1:
    S3+=S2[i]
  else:
    S3+=S[i]
     i==K-1 i K-1 K 1 S3+=S2[i] S3 S2[i] S2 i S3+=S[i] S3 S[i] S i print(S3) print S3 S=input() input() S S3+=S[i] S[i] S3 S3='' '' S3 K=map(int,input().split()) map(int,input().split()) K S2=S.lower() S.lower() S2 N,K=map(int,input().split()) map(int,input().split()) N S3+=S2[i] S2[i] S3
N,K=map(int,input().split())
S=input()
S2=S.lower()
S3=''

for i in range(N):
  if i==K-1:
    S3+=S2[i]
  else:
    S3+=S[i]
    
print(S3)