from collections import Counter 
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import sys
sys.setrecursionlimit(10**6)

#n=int(input())
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
input_list = lambda : list(map(int,input().split()))

n,k=input_list()
k-=1
s=[v for v in input()]

diff=ord("A")-ord("a")

s[k]=(chr(ord(s[k])-diff))
print("".join(s)) from collections import Counter from collections import defaultdict from collections import deque import math math import itertools itertools import heapq heapq import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 input_list = lambda : list(map(int,input().split())) input_list lambda : list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split n,k=input_list() n input_list() input_list k k-=1 k 1 v for v in input() for v in input() v input() input for v in input() v s=[v for v in input()] s [v for v in input()] diff=ord("A")-ord("a") diff ord("A")-ord("a") ord("A") ord "A" ord("a") ord "a" s[k]=(chr(ord(s[k])-diff)) s[k] s k chr(ord(s[k])-diff) chr ord(s[k])-diff ord(s[k]) ord s[k] s k diff print("".join(s)) print "".join(s) "".join "" join s k-=1 1 k n,k=input_list() input_list() n input_list = lambda : list(map(int,input().split())) lambda : list(map(int,input().split())) input_list k=input_list() input_list() k s=[v for v in input()] [v for v in input()] s diff=ord("A")-ord("a") ord("A")-ord("a") diff
from collections import Counter 
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import sys
sys.setrecursionlimit(10**6)

#n=int(input())
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
input_list = lambda : list(map(int,input().split()))

n,k=input_list()
k-=1
s=[v for v in input()]

diff=ord("A")-ord("a")

s[k]=(chr(ord(s[k])-diff))
print("".join(s))