Problem:
 Score : 100 points    Problem Statement You are given a string S of length N consisting of A , B and C , and an integer K which is between 1 and N (inclusive).
Print the string S after lowercasing the K -th character in it.      Constraints  1 ≤ N ≤ 50  1 ≤ K ≤ N  S is a string of length N consisting of A , B and C .         Input Input is given from Standard Input in the following format:  N  K  S       Output Print the string S after lowercasing the K -th character in it.        Sample Input 1 3 1
ABC      Sample Output 1 aBC       Sample Input 2 4 3
CABA      Sample Output 2 CAbA

Solution (Python):
N,K = map(int,input().split())
K = K-1
S = input()
S_list = list(S)
if S_list[K] == "A":
  S_list[K] = "a"
elif S_list[K] == "B":
  S_list[K] = "b"
else:
  S_list[K] = "c"

S_changed = "".join(S_list)
print(S_changed)

Solution (Python):
N, K = map(int, input().split())
S=input()
LS = [(S[i]) for i in range(N)]
if LS[K-1]== "A":
  LS[K-1]="a"
elif LS[K-1]=="B":
  LS[K-1]="b"
else:
  LS[K-1]="c"
S=''.join(LS)
print(S)

Solution (Python):
N, K = list(map(int, input().split()))
S = input()

s = S[0:(K-1)] + S[K-1].lower() + S[K:]

print(s)

Solution (Python):
N, K = list(map(int, input().split()))
S = list(input())

S[K - 1] = S[K - 1].lower()

print("".join(S))

Solution (Python):
N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()
ans = ''.join(S)
print(ans)

Solution (Python):
N,K = map(int,input().split())
S = input()
SL = [i for i in S]
SL[K-1] = SL[K-1].lower()
print("".join(SL))

Solution (Python):
T,K = (i for i in input().split())
N = input()
K = int(K)
X = list(N)
if X[K-1] == 'A':
    X[K-1] = 'a'
if X[K-1] == 'B':
    X[K-1] = 'b'
if X[K-1] == 'C':
    X[K-1] = 'c'
print(''.join(X))

Solution (Python):
N,K = map(int,input().split(" "))
S = list(input())

tmp = S[K-1].lower()
S[K-1] = tmp
ans = "".join(S)

print(ans)

Solution (Python):
N, K = input().split()
N = int(N)
K = int(K)
S = input()
s_list = list(S)
s_list[K-1] = s_list[K-1].lower()
S = ''.join(s_list)
print(S)

Solution (Python):
N, K = map(int,input().split())
S = list(input())
if S[K-1] == 'A':
  S[K-1] = 'a'
elif S[K-1] == 'B':
  S[K-1] = 'b'
elif S[K-1] == 'C':
  S[K-1] = 'c'
  
print("".join(S))

Solution (Python):
n, k = [int(a) for a in input().split()]
s = list(input())

s[k-1] = s[k-1].lower()

print("".join(s))

Solution (Python):
n, k = map(int, input().split())
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s))

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

n, k = na()
s = ns()

ans = ""
for i in range(n):
    if i+1 == k:
        ans = ans + s[i].lower()
    else:
        ans = ans + s[i]


print(ans)

Solution (Python):



a = list(map(int,input().split()))
S = list(input())
N=a[0]
K=a[1]

S[K-1] = S[K-1].lower()

print(''.join(S))

Solution (Python):
N, K = map(int,input().split())
S = input()
t = S[K-1:K]
if t == 'A':
  print(S[:K-1] + 'a' + S[K:])
elif t == 'B':
  print(S[:K-1] + 'b' + S[K:])
else:
  print(S[:K-1] + 'c' + S[K:])

Solution (Python):
A = list(map(lambda x: int(x),input().split()))
N = A[0]
K = A[1]
s = input()
s_1 = s[:K-1]
s_2 = s[K-1:].lower().capitalize().swapcase()



print(s_1 + s_2)

Solution (Python):
N, K = map(int, input().split())
S = list(i for i in input())
for i in range(N):
    if i == K-1:
        print(S[i].lower(),end="")
    else:
        print(S[i],end="")

Solution (Python):

"""
Created on Sun May 19 21:06:16 2019

@author: Yamazaki Kenichi
"""

N, K = map(int,input().split())
S = input()

t = {'A':'a','B':'b','C':'c'}

print(S[:K-1] + t[S[K-1]] + S[K:])

Solution (Python):


inputs = input().split(' ')
N = int(inputs[0])
K = int(inputs[1]) - 1
S = input()

r = ''
for i, s in enumerate(S):
    if i == K:
        s = chr(ord(s) + 32)
    r += s
print(r)

Solution (Python):
number = input().split()
text = input()

text_list = list(text)

text_list[int(number[1]) - 1] = text_list[int(number[1]) - 1].lower()
for i in text_list:
    print(i,end="")

Solution (Python):
inp = input()
s = input()
inp_st = inp.split()
n = int(inp_st[0])
k = int(inp_st[1])
ans = ""
for i, st in enumerate(s):
    if i == k - 1:
        ans = ans + st.lower()
    else:
        ans = ans + st
print(ans)

Solution (Python):
N, K = map(int, input().split())
S = input()

if S[K - 1] == "A":
    S = S[:K - 1] + "a" + S[K:]
elif S[K - 1] == "B":
    S = S[:K - 1] + "b" + S[K:]
elif S[K - 1] == "C":
    S = S[:K - 1] + "c" + S[K:]
print(S)

Solution (Python):
x = [int(i) for i in input().split()]
n = x[0]
index = x[1]
s = input()
tmp = s[index-1:index].lower()
s  =  s[:index-1] + tmp + s[index:]
print(s)

Solution (Python):


l = list(map(int,input().split()))
N = l[0]
K = l[1]
s = input()
ans = ""

for i in range(N):
    if i != K - 1:
        ans += s[i]
    else:
        a = s[i]
        a = a.lower()
        ans += a


print(ans)

Solution (Python):
N,K = map(int, input().split())
S = list(input())
a = S.pop(K-1)
if a =="A":
    a = 'a'
elif a =="B":
    a = 'b'
elif a =="C":
    a = 'c'
S.insert(K-1,a)
ans =''
for i in range(N):
    ans += S[i]

print(ans)

Solution (Python):
import sys

(n,k) = map(int, input().split())
s = input()
ret = ""
for i,v in enumerate(s):
  if i+1 == k:
    ret = ret + v.lower()
  else:
    ret = ret + v
print(ret)

Solution (Python):

N, K = map(int, input().split(" "))
S = input()
d = {"A": "a", "B": "b", "C": "c"}
r = ""
for i, s in enumerate(S):
    if i == K-1:
        r += d[s]
    else:
        r += s
print(r)

Solution (Python):


[N, K] = [int(i) for i in input().split()]
S = input()

S_list = list(S)
s = S_list[K-1]
new_s = s.lower()
S_list[K-1] = new_s

new_S = "".join(S_list)

print(new_S)

Solution (Python):

"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""


"""
Created on Sat Apr 13 09:53:12 2019

@author: Owner
"""
import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect


def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


"""
N, X = map(int, input().split())

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

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())


dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')


ABT = zip(A, B, totAB)
result = 0

sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)


(x >> i) & 1


dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break

add = 1 
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)


li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    


org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)




    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

"""
N, K = list(map(int, input().split()))
S = input()
S = list(S)

def main():
    k=K-1
    if S[k]=="A":
        S[k] = "a"
    if S[k]=="B":
        S[k] = "b"
    if S[k]=="C":
        S[k] = "c"
    print("".join(S))
                
                
                
    
    
if __name__ == '__main__':
    main()

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

Solution (Python):
N,K=map(int,input().split())
S=str(input())

print(S[:K-1]+S[K-1].lower()+S[K:])

Solution (Python):
N, K =  list(map(int,input().split()))
S = input().strip()
new_s = "".join([char  if idx != K-1  else char.lower() for idx,char in enumerate(S)])
print(new_s)

Solution (Python):
N,K = list(map(int,input().split()))
S = list(input())

S[K-1] = S[K-1].lower()

print(''.join(S))

Solution (Python):
def main():
    N,K = map(int, input().split())
    S = input()
    if K == 1:
        print(S[0].lower() + S[1:])
    elif K == N:
        print(S[:N-1] + S[N-1].lower())
    else:
        print(S[0:K-1] + S[K-1].lower() + S[K:])

if __name__ == '__main__':
    main()

Solution (Python):
n,k = map(int, input().split())

s=input()

print(s[:k-1]+s[k-1].lower()+s[k:])

Solution (Python):
N, K = map(int, input().split())
S = input()

str_list = list(S)

if str_list[K-1] == 'A':
    str_list[K-1] = 'a'
elif str_list[K-1] == 'B':
    str_list[K-1] = 'b'
elif str_list[K-1] == 'C':
    str_list[K-1] = 'c'

s = ''

for x in str_list:
    s += x

print(s)

Solution (Python):
N, K = map(int, input().split())  
S = input()
S = S[:K-1] + S[K-1].lower() + S[K:]
print(S)

Solution (Python):
N,K = map(int,input().split())
S = list(input())
S[K-1] = S[K-1].swapcase()
print("".join(S))

Solution (Python):
N,K=map(int,input().split())
S=input()
L=str.lower(S[K-1])
print(S[0:K-1]+L+S[K:N])

Solution (Python):
N,K = map(int, input().split()) 
S = str(input()) 

new = []
[new.append(S[c]) for c in range(N)]
change = new[K-1]
if change == "A":
  new[K-1] = "a"
elif change == "B":
  new[K-1] = "b"
elif change == "C":
  new[K-1] = "c"
  

print("".join(new))

Solution (Python):
N, K = map(int, input().split())
S=input()
char_list = [char for char in S]
char_list[K-1] = char_list[K-1].lower()
S=""
for char in char_list:
    S+=char
print(S)

Solution (Python):
N,K=map(int,input().split())
S=input()
ans=str()

for i in range(N):
    if i!=K-1:
        ans=ans+S[i]
    else:
        if S[K-1]=="A":
            ans=ans+"a"
        if S[K-1]=="B":
            ans=ans+"b"
        if S[K-1]=="C":
            ans=ans+"c"

print(ans)

Solution (Python):
N, K = map(int, input().split())
S = list(input())

S[K-1] = S[K-1].lower()

mojiretu = ''.join(S)
print(mojiretu)

Solution (Python):
n,k=map(int,input().split())
s=input()
r=''
for i in range(n):
    if(i==k-1):
        r=r+s[i].lower()
    else:
        r=r+s[i]
print(r)

Solution (Python):
N, K = map(int, input().split())
S = input()
l = S[:K - 1]
c = S[K - 1]
r = S[K:]
print(l + c.lower() + r)

Solution (Python):
a, b = map(int, input().split(' '))
c = input()
print(c[:b-1]+c[b-1:b].lower()+c[b:])

Solution (Python):
n, k = list(map(int, input().split()))
s = input()


strings = ''
for i in range(0, len(s)):
    if i == k-1:
        strings = strings + s[i].lower()
    else:
        strings = strings + s[i]

print(strings)

Solution (Python):
n,k = map(int, input().split())
s = input()

a = s[k-1].lower()
print(s[:k-1] + a + s[k:])

Solution (Python):
N, K = map(int, input().split())
S = input()
s=""
for x in S:
    if(len(s)==K-1):
        s+=x.lower()
    else:
        s+=x
print(s)

Solution (Python):
a,b=map(int,input().split())
l=list(input())
l[b-1]=l[b-1].lower()
print(''.join(l))

Solution (Python):
N, K = (int(x) for x in input().split())
S = input()
ans = S[:K-1] + S[K-1:K].lower() + S[K:N]
print(ans)

Solution (Python):
a = input().split()
n = int(a[0])
k = int(a[1])
s = input()

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

Solution (Python):
n, k = map(int, input().split())
s = input()
s[k-1].lower()
for i in range(len(s)):
    if i == k-1:
        print(s[i].lower(), end='')
    else:
        print(s[i], end='')
print()

Solution (Python):
n, k = map(int, input().split())
s = input()
print(s[:k-1] + s[k-1].lower() + s[k:])

Solution (Python):
n, k = map(int, input().split())
s = list(input())
if s[k - 1] == 'A':
    s[k - 1] = 'a'
elif s[k - 1] == 'B':
    s[k - 1] = 'b'
elif s[k - 1] == 'C':
    s[k - 1] = 'c'
print("".join(s))

Solution (Python):

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

ret = "".join([i if n != k-1 else i.lower() for n,i in enumerate(s)])
print(ret)

Solution (Python):
import math
import random


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

sr = ""

for i in range(n):
    if i+1 == k:
        sr += s[i].lower()
    else:
        sr += s[i].upper()
print (sr)

Solution (Python):
N, K = map(int, input().split())
S = input()
str_list = list(S)
str_list[K - 1] = str_list[K - 1].lower()
S = "".join(str_list)
print(S)

Solution (Python):
N, K = map(int, input().split(" "))
S = input()
S_list = ["l" for k in range(N)]
for i in range(N):
    S_list[i] = S[i]

if S_list[K-1] == "A":
    S_list[K-1] = "a"
elif S[K-1] == "B":
    S_list[K-1] = "b"
else:
    S_list[K-1] = "c"

A = ""
for j in range(N):
    A += S_list[j]

print(A)

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    token = lines[0].split()
    n = int(token[0])
    k = int(token[1])
    s = lines[1]

    return (n, k, s)


def solve(n, k, s):

    
    return s[0:k-1] + s[k-1].lower() + s[k:]




def main():
    

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

Solution (Python):
N,K = map(int,input().split())
S = input()

se = ''
for i in range(N):
    if i == K-1:
        se += S[K-1].lower()
    else:
        se += S[i]
print(se)

Solution (Python):
n,k=map(int, input().split())
s=input()
s = s[:k-1] + s[k-1].lower() + s[k:]
print(s)

Solution (Python):
N,K= map(int, input().split())
S = list(str(input()))

S[K-1] = S[K-1].lower()
print(''.join(S))

Solution (Python):
N, K = map(int, input().split())

S = input()

for i, c in enumerate(S,1):
    if i == K:
        print(c.lower(), end='')
    else:
        print(c,end='')

print('')

Solution (Python):


N, K = map(int, input().split())


S = list(input())
s = S[K-1]

if s == 'A':
	S[K-1] = 'a'
elif s == 'B':
	S[K-1] = 'b'
else:
	S[K-1] = 'c'

print(''.join(S))

Solution (Python):
from sys import stdin

n, k = [int(x) for x in stdin.readline().rstrip().split()]
s = stdin.readline().rstrip()

k -= 1
if s[k]=='A':
  ans = s[0:k] + "a" + s[k+1:n]
elif s[k]=='B':
  ans = s[0:k] + "b" + s[k+1:n]
elif s[k]=='C':
  ans = s[0:k] + "c" + s[k+1:n]

print(ans)

Solution (Python):
n,k = (int(i) for i in input().split()) 
s = input()

print(s[:k-1]+s[k-1].lower()+s[k:])

Solution (Python):
n, k = map(int, input().split())
s = input()
ans = []

for i in range(n):
  if i+1 == k:
    if s[i] == 'A':
      ans.append('a')
    elif s[i] == 'B':
      ans.append('b')
    elif s[i] == 'C':
      ans.append('c')
  else:
    if s[i] == 'A':
      ans.append('A')
    elif s[i] == 'B':
      ans.append('B')
    elif s[i] == 'C':
      ans.append('C')
    
      
print(''.join(ans))

Solution (Python):
N, K = map(int, input().split(" "))
moji = input()

result = ""
for i in range(N) :
    temp = moji[i]
    if i==K-1 :
        temp = moji[i].lower()
    result =  result + temp
print(result)

Solution (Python):
N, K = map(int, input().split())
S = list(input())

S[K-1] = S[K-1].lower()

print(''.join(S))

Solution (Python):




intext1 = input()
[n, k] = map(int, intext1.split())

intext2 = input()

outtext = intext2[:k-1] .lower()
if k == 1:
    outtext = intext2[0].lower() + intext2[1:]
elif k == n:
    outtext = intext2[:k-1] + intext2[k-1].lower()
else:
    outtext = intext2[0:k-1] + intext2[k-1].lower() + intext2[k:]

print(outtext)

Solution (Python):

inputs = input().split()
n = int(inputs[0])
k = int(inputs[1])
s = input()

if s[k-1] == 'A':
    s = s[0:k-1] + 'a' + s[k:]
elif s[k-1] == 'B':
    s = s[0:k-1] + 'b' + s[k:]
elif s[k-1] == 'C':
    s = s[0:k-1] + 'c' + s[k:]

print(s)

Solution (Python):
N,K = map(int,input().split())
K -= 1
S = input()
s = ""
for i in range(N):
 if  i == K:
  if S[i] == "A":
   s = s+"a"
  else:
   if S[i] == "B":
    s = s+"b"
   else:
    s = s+"c"
 else:
  s = s + S[i]
print(s)

Solution (Python):
N, K = map(int,input().split())
list1 =[i for i in input()]
list1[K-1] = list1[K-1].lower()
ans = ''.join(list1)
print(ans)

Solution (Python):
li = input().split()
n = int(li[0])
k = int(li[1])
s = list(input())
s[k - 1] = s[k - 1].lower()
print("".join(s))

Solution (Python):
N, K = map(int,input().split())
S = input()

lst_s = list(S)
if lst_s[K-1] == 'A':
    lst_s[K-1] = 'a'
elif lst_s[K-1] == 'B':
    lst_s[K-1] = 'b'
else:
    lst_s[K-1] = 'c'

S = ''.join(lst_s)
print(S)

Solution (Python):
N, K = map(int, input().split())
S=input()
if S[K-1] == "A":
    ans = S[:K-1] + "a" + S[K:]
elif S[K-1] == "B":
    ans = S[:K-1] + "b" + S[K:]
else:
    ans = S[:K-1] + "c" + S[K:]
print(ans)

Solution (Python):
n, k = map(int, input().split())
s = list(input())

if s[k-1] == "A":
    s[k-1] = 'a'
elif s[k-1] == "B":
    s[k-1] = 'b'
else:
    s[k-1] = 'c'

s = ''.join(s)
print(str(s))

Solution (Python):

N ,K=map(int ,raw_input().split())
S =raw_input()
s = S[K-1]
s = s.lower()
S1 = ''
if K > 1:
    S1 = S[:K-1]
S2 = ''
if K<N:
    S2 = S[K:]
s =S1+s+S2
print s

Solution (Python):
n, k = map(int, raw_input().split(" "))
s = raw_input()

new_s = s[:k - 1] + chr(ord(s[k - 1]) + 32) + s[k:]
print(new_s)

Solution (Python):
nk = list(map(lambda x: int(x), input().split()))
n = nk[0]
k = nk[1]
s = input()

front = s[:k-1]
back = s[k:]
target = s[k-1].lower()

answer = front + target + back
print(answer)

Solution (Python):
N, K = map(int, input().split())

S=input()
K=K-1
s=S
s=str.lower(s)
ans=''
for _ in range (N):
    if _==K:
        ans+=s[_]
    else:
        ans+=S[_]
print(ans)

Solution (Python):
N, K = map(int, input().split())
S = list(input())

for i in range(len(S)):
    if i == K-1:
        S[i] = S[i].lower()
print(''.join(S))

Solution (Python):
N, K = map(int, input().split())
S = input()
print(S[:K - 1] + S[K - 1].lower() + S[K:])

Solution (Python):






N, K = map(int, input().split())
S = list(input())





if S[K-1] == "A":
    S[K-1] = "a"
elif S[K-1] == "B":
    S[K-1] = "b"
else:
    S[K-1] = "c"





print("".join(S))

Solution (Python):
N, K = map(int, input().split())
S = input()

target = ''
if S[K - 1] == 'A':
    target = 'a'
elif S[K - 1] == 'B':
    target = 'b'
elif S[K - 1] == 'C':
    target = 'c'
print(S[:K - 1] + target + S[K:])

Solution (Python):
N,M = map(int,input().split())
S = str(input())
tmp  = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
tmp2 = "abcdefghijklmnopqrstuvwxyz"
ans = ""
for i in range(N):
    if i==M-1:
        for j in range(26):
            if S[M-1]==tmp[j]:
                ans += tmp2[j]
                break
    else:
        ans += S[i]
print(ans)

Solution (Python):


N, K = map(int, input().split())
s = input()

output = ''
for i in range(N):
    if i == K - 1 :
        if s[i] == 'A':
            output += 'a'
        elif s[i] == 'B':
            output += 'b'
        elif s[i] == 'C':
            output += 'c'
    else:
        output += s[i]

print(output)

Solution (Python):


N, K = map(int, raw_input().split())
S = raw_input()

_ans = str()

if S[K-1] == "A":
    _ans = S[:K-1]+"a"+S[K:]
elif S[K-1] == "B":
    _ans = S[:K-1]+"b"+S[K:]
elif S[K-1] == "C":
    _ans = S[:K-1]+"c"+S[K:]

print _ans

Solution (Python):
N, K = map(int,input().split())	
S = input()

S_new = []
for i in range(N):
    if i != K - 1:
        S_new.append(S[i])
    else:
        S_new.append(S[i].lower())

ans = ''.join(S_new)
print(ans)

Solution (Python):
import sys
N, K = map(int, input().split())
s = input()
for i in range(N):
  if(i==(K-1)):
    sys.stdout.write(s[i].lower())
  else:
    sys.stdout.write(s[i])
print()

Solution (Python):
N, K = map(int,input().split())
S = input()

S_list = list(S)
K = K-1
S_list[K] = S_list[K].lower()
print("".join(S_list))

Solution (Python):
import sys  
input = sys.stdin.readline

N,K  = list(map(int, input().split()))
S = input()

s = list(S)

s[K-1] =  s[K-1].lower()
ans = ""
for x in s:
    ans+=x

print(ans)

Solution (Python):
N, K = map(int, input().split())
S = list(input())

S[K-1] = chr(ord(S[K-1]) + 32)[0]

print(''.join(S))

Solution (Python):
n, k = map(int, input().split())
s = input()
ans = ""

for i in range(n):
    if(i==(k-1)):
        ans += s[i].lower()
    else:
        ans += s[i]

print(ans)

Solution (Python):
import sys
import os

N,K = map(int,input().split())
S=list(input())

S[K-1]=S[K-1].lower()

mojiretsu = "".join(S)

print(mojiretsu)

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

Solution (Python):
n, k = map(int, input().split())
s = input()

tikan = s[k-1].lower()

s_tikan = s[:k-1] + tikan + s[k:]
print(s_tikan)

Solution (Python):
n,k=list(map(int,input().split()))
s=list(input())
s[k-1]=s[k-1].lower()
print("".join(s))

Solution (Python):
def convert(c):
    if c == 'A':
        return 'a'
    elif c == 'B':
        return 'b'
    return 'c'

nk = input()
nk = nk.split(' ')
nk = [int(a) for a in nk]

k = nk[1]
s = input()

result = s[:k-1]
result += convert(s[k - 1])
result += s[k:]
print(result)

Solution (Python):
n, k = map(int, input().split())
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s))

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

Solution (Python):





import sys
input = sys.stdin.readline
N, K = map(int, input().split())
S = input()




ks = S[K-1].lower()


S = S[:K-1] + ks + S[K:]
print(S)

Solution (Python):
import itertools
import fractions
from functools import reduce

a = [int(s) for s in input().split(' ')]
S = input()

str_list = list(S)
str_list[a[1] - 1] = str_list[a[1] - 1].lower()

print("".join(str_list))

Solution (Python):


from sys import stdin
    
def main():
    n,k = [int(x) for x in stdin.readline().rstrip().split()]
    s = stdin.readline().rstrip()

    ans = s[0:max(0,k-1)] + s[k-1].lower() + s[k:n]
    print(ans)
    
if __name__=='__main__':
    main()

Solution (Python):

N,K=map(int,input().split())

S=str(input())
q=S[K-1]


if q == "A":
    w="a"
elif q=="B":
    w="b"
else:
    w="c"
e=""
for i in range(N):
    if i != K-1:
        e=e+S[i]
    else:
        e=e+w
print(e)

Solution (Python):
n,k=map(int,input().split())
t = list(input())
d = {"A":"a","B":"b","C":"c"}
s = ""
for i,n in enumerate(t):
    if i+1 ==k:
        s+=d[n]
    else:
        s+=n
print(s)

Solution (Python):
n, k = list(map(int, input().split()))
k -= 1
s = input()

if s[k] == 'A':
    sr = 'a'
elif s[k] == 'B':
    sr = 'b'
else:
    sr = 'c'
    
s1 = s[:k] + sr + s[k+1:]

print(s1)

Solution (Python):
n,k = map(int,input().split())
s = list(input())
s[k-1] = s[k-1].lower()
for i in range(len(s)):
    print(s[i],end="")
print()

Solution (Python):
n,k = map(int,input().split())
s = input()
s_list = list(s)
if s_list[k-1] == 'A':
    s_list[k-1] = 'a'
elif s_list[k-1] == 'B':
    s_list[k-1] = 'b'
elif s_list[k-1] == 'C':
    s_list[k-1] = 'c'
print("".join(s_list))

Solution (Python):
n, k = list(map(int, input().split()))
s = input()

for i in range(k-1):
    print(s[i], end="")
print(s[k-1].lower(), end="")
for j in range(k, n):
    print(s[j], end="")

Solution (Python):
n,k = map(int,input().split())
s = input()
print(s[0:k-1] + s[k-1].lower() + s[k:n])

Solution (Python):
N,K = map(int,input().split())
S = list(input())
S[K-1] = S[K-1].lower()
print("".join(S))

Solution (Python):
n,k=map(int,input().split())
s=input()
s=list(s)
if s[k-1]=='A':
    s[k-1]='a'
elif s[k-1]=='B':
    s[k-1]='b'
elif s[k-1]=='C':
    s[k-1]='c'
s= "".join(s)
print(s)

Solution (Python):
n,k = map(int,input().split())
s = list(input())
s[k-1] = s[k-1].lower()
ans = ''
for i in s:
    ans += i
print(str(ans))

Solution (Python):
N, K = map(int, input().split())
text = input()
s = text[K-1]
s = s.lower()
text = text[:K-1]+s+text[K:]
print(text)

Solution (Python):



a, b = map(int, input().split())

s = [i for i in input()]

s[b - 1] = s[b - 1].lower()
print(''.join(s))

Solution (Python):
N,K = map(int,input().split())
S = str(input())
S_list = list(S)

if S_list[K-1] == 'A':
     S_list[K-1] = 'a'

if S_list[K-1] == 'B':
     S_list[K-1] = 'b'

if S_list[K-1] == 'C':
     S_list[K-1] = 'c'

S_changed = "".join(S_list)

print(S_changed)

Solution (Python):
n,k=map(int,input().split())
S=list(input())
S[k-1]=str.lower(S[k-1])
print(''.join(S))

Solution (Python):
N, K = map(int,input().split())	
S = input()

S_new = []
for i in range(N):
    if i != K - 1:
        S_new.append(S[i])
    else:
        S_new.append(S[i].lower())

ans = ''.join(S_new)
print(ans)

Solution (Python):
N,K=map(int,input().split())
S = input()

S_list = list(S)
S_list[K-1] = S_list[K-1].lower()

print("".join(S_list))

Solution (Python):
n, k = map(int,input().split())
s = input()
dic = {"A": "a","B":"b","C":"c"}
print(s[:k-1] + dic[s[k-1]] + s[k:])

Solution (Python):
N, K = map(int,input().split())
S = [c for c in input()]
S[K-1] = S[K-1].lower()
print("".join(S))

Solution (Python):
N,K = map(int, input().split())
S = str(input())
ans = ""
for i in range (N):
    if i != K-1:
        ans += S[i]
    else:
        ans += S[i].lower()
print(ans)

Solution (Python):
n, k = map(int, input().split())
s = list(input())

s[k - 1] = s[k-1].lower()
print(''.join(s))

Solution (Python):
a = map(int,input().split())
a = list(a)
b = input()
b = list(b)
for i in range(a[0]):
    if i == (a[1] - 1):
        b[i] = b[i].lower()
    print(b[i],end = '')

Solution (Python):
n, k = map(int, input().split())
s = input()
s_list = list(s)
if s_list[k-1] == "A":
	s_list[k-1] = "a"
elif s_list[k-1] == "B":
	s_list[k-1] = "b"
elif s_list[k-1] == "C":
	s_list[k-1] = "c"
s_change = "".join(s_list)
print(s_change)

Solution (Python):
N,K = map(int,input().split())
S=list(input())

S[K-1] = S[K-1].lower()


print(''.join([ str(item) for item in S ]))

Solution (Python):
line = input()
N, K = list(map(int, line.split(' ')))
S = input()

def convert(character):
    return chr(ord(character[0]) + 32)

print(S[0:K-1]+ convert(S[K-1]) + S[K:])

Solution (Python):
N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()

print(''.join(S))

Solution (Python):
n, k = [int(i) for i in input().split()]
s = input()
list_s = list(s)
list_s[k-1] = list_s[k - 1].lower()
print("".join(list_s))

Solution (Python):
n, k = [int(x) for x in input().strip().split()]
s = input().strip()
print(s[:k-1]+s[k-1].lower()+s[k:])

Solution (Python):
N, K = map(int, input().split())
S = input().rstrip()
print(S[:K-1]+S[K-1].lower()+S[K:])

Solution (Python):
n, k = map(int, input().split())
s = input()
r = []
for i in range(n):
  if i == k-1:
    r.append(s[i].lower())
  else:
    r.append(s[i])
print(''.join(r))

Solution (Python):
n = input().split()
c = list(input()) 
c[int(n[1]) - 1] = c[int(n[1]) - 1].lower()
print("".join(c))

Solution (Python):
inputa = input().split()
inputb = list(input())
if inputb[int(inputa[1])-1] == "A":
  inputb[int(inputa[1])-1] = "a"
if inputb[int(inputa[1])-1] == "B":
  inputb[int(inputa[1])-1] = "b"
if inputb[int(inputa[1])-1] == "C":
  inputb[int(inputa[1])-1] = "c"

print("".join(inputb))

Solution (Python):
N, K = map(int, input().split())
S = input()

ret = []
for i in range(N):
    if i == K-1:
        ret.append(S[i].lower())
    else:
        ret.append(S[i])
ret = "".join(ret)
print(ret)

Solution (Python):
n,k=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower()
print(''.join(s))

Solution (Python):
import sys
input = sys.stdin.readline

N, K = map(int, input().split())
S = list(input())

S[K-1] = S[K-1].lower()

for i in S:
    print(i,end='')

print('\n')

Solution (Python):


a = list(map(int, input().split()))
b=input()
for i in range(len(b)):
    if i==a[1]-1:
        print(b[i].lower(),end="")
    else:
        print(b[i],end="")

Solution (Python):
N, K = map(int,input().split())
S = input()


S2 = S[0:K-1] + S[K-1].lower() + S[K:N]

print(S2)

Solution (Python):
import sys

def solve(n, s, k):
    ans = s[0:k-1] + s[k-1].lower()
    if k < n:
      ans += s[k:n]
    return ans

if __name__ == '__main__':

    n, k = map(int, sys.stdin.readline().strip().split(" "))
    s = sys.stdin.readline().strip()
    ans = solve(n, s, k)
    print ans

Solution (Python):
N, K = map(int, input().split())
S = input()
if 1 == K:
    print(S[K - 1].lower() + S[K::])
else:
    print(S[:K - 1] + S[K - 1].lower() + S[K::])

Solution (Python):

n, k = map(int, input().split())
s = input()
ans = ''
for i in range(n):
    if i == k-1:
        ans += s[i].lower()
    else:
        ans += s[i]
print(ans)

Solution (Python):
N, K = map(int, input().split())
S = str(input())

ans = S[:K-1] + S[K-1].lower() + S[K:]
print(ans)

Solution (Python):
N,K=map(int,input().split())
S=input()
if S[K-1]=="A":
    ans=S[:K-1]+"a"+S[K:]
elif S[K-1]=="B":
    ans=S[:K-1]+"b"+S[K:]
if S[K-1]=="C":
    ans=S[:K-1]+"c"+S[K:]
print(ans)

Solution (Python):
































N, K = map(int, input().split())
S = input()

S = S[:K-1] + S[K-1].lower() + S[K:]

print(S)

Solution (Python):
N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()
for i in S :
    print(i, end='')

Solution (Python):
Q,V = map(int,input().split())
N = str(input())
Na = N[V-1]
na = Na.lower()

print(N[:V-1]+na +N[V:])

Solution (Python):
N,K = tuple(map(int,input().split()))
S = input()
K = K-1
print(S[:K]+{"A":"a","B":"b","C":"c"}[S[K]]+S[K+1:])

Solution (Python):
n, k = map(int, input().split())
s = input()
d = {"A":"a", "B":"b", "C":"c"}

print(s[:k-1]+d[s[k-1]]+s[k:])

Solution (Python):
n, k = map(int, input().split())
s = input()
in_arr = [l for l in s]
new_lower = s[k-1].lower()
in_arr[k-1] = new_lower
ans = ''
for letter in in_arr:
  ans += letter
print(ans)

Solution (Python):
N,K=map(int,input().split())
S=input();K-=1
def change(k):
    t=ord(k)
    return chr(t-65+97)
print(S[:K]+change(S[K])+S[K+1:])

Solution (Python):
n, k = map(int, input().split())
s = input()
str_list = list(s)
if str_list[k-1] == 'A':
    str_list[k-1] = 'a'
elif str_list[k-1] == 'B':
    str_list[k-1] = 'b'
elif str_list[k-1] == 'C':
    str_list[k-1] = 'c'

str_changed = "".join(str_list)
print(str_changed)

Solution (Python):
n,k = (int(i) for i in input().split()) 
s=input()
s=list(s)
s[k-1]=s[k-1].lower()
s="".join(s)
print(s)

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n,k = na()
s = list(ns())

a = s[k-1].lower()

s[k-1] = a

print("".join(s))