import sys 

num = list(map(int, input().split()))

input= sys.stdin.readline()
def convert(str,number):
  num = number-1
  str_one = str[num].lower()
  return str[0:num]+str_one+str[number:]
print(convert(input,num[1])) import sys sys num = list(map(int, input().split())) num list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split input= sys.stdin.readline() input sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline def convert(str,number):
  num = number-1
  str_one = str[num].lower()
  return str[0:num]+str_one+str[number:] convert num = number-1 num number-1 number 1 str_one = str[num].lower() str_one str[num].lower() [num].lower [num] str num lower return str[0:num]+str_one+str[number:] str[0:num]+str_one+str[number:] str[0:num]+str_one str[0:num] str 0:num 0 num str_one str[number:] str number: number str str number number print(convert(input,num[1])) print convert(input,num[1]) convert input num[1] num 1 num = list(map(int, input().split())) list(map(int, input().split())) num def convert(str,number):
  num = number-1
  str_one = str[num].lower()
  return str[0:num]+str_one+str[number:] def convert(str,number):
  num = number-1
  str_one = str[num].lower()
  return str[0:num]+str_one+str[number:] convert input= sys.stdin.readline() sys.stdin.readline() input
import sys 

num = list(map(int, input().split()))

input= sys.stdin.readline()
def convert(str,number):
  num = number-1
  str_one = str[num].lower()
  return str[0:num]+str_one+str[number:]
print(convert(input,num[1]))