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 = [int(s) for s in input().split(" ")]
S = input()
print(S[:max(0, K-1)] + S[K-1].lower() + S[K:])

Solution (Python):

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

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

_s = s[:k-1] + change[s[k-1]] + s[k:]
print(_s)

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''

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

    output = S

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

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math

mod = 10**9+7

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

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

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

Solution (Python):
a, b = map(int, input().split())
S = input()
sum = ""
for i, s in enumerate(S):
  if i+1 ==b:
    s = s.lower()
  sum += s
print("{}".format(sum))

Solution (Python):
import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N,K = IL()
s = S()
dic = {"A":"a","B":"b","C":"c"}


if s[K-1] == "A":
    ans = s[:K-1] + "a" + s[K:]
if 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 = list(str(input()))
for i in range(N):
    if i == (K-1):
        S[i] = S[i].lower()
print("".join(S))

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

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

Solution (Python):


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

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

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

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):
n ,k = map(int,input().split())
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 = list(map(int, input().split(' ')))
S = input()
out = ''
for i, s in enumerate(S):
    if i == K-1:
        s = s.lower()
    out += s
print(out)

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):
if __name__ == '__main__':
    N, K = map(int, input().split())
    S = str(input())

    S_list = list(S)

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

    answer = "".join(S_list)

    print(answer)

Solution (Python):
n,k=map(int,input().split())
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_temp = s.swapcase()

ans = s[:k-1]+s_temp[k-1]+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"

elif s[k-1] == "C":
    s[k-1] = "c"


for i in range(len(s)):
    print(s[i], end="")

print()

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

Solution (Python):
def solve():
    N, K = [int(_) for _ in raw_input().split()]
    S = [_ for _ in raw_input()]
    S[K-1] = S[K-1].lower()
    print ''.join(S)

if __name__ == '__main__':
    solve()

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

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

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

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

for i in range(n):
  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):
import sys
input = sys.stdin.readline

n, k = map(int, input().split())
S = list(input().rstrip())
S[k-1] = S[k-1].lower()
print("".join(S))

Solution (Python):
from sys import stdin

def solve(n, k, s):
    ans = ''
    for i, char in enumerate(s):
        newChar = char.lower() if i + 1 == k else char
        ans = ans + newChar
    return ans


def main():
    lines = stdin.readlines()
    n, k = [int(n) for n in lines[0].split(' ')]
    s = lines[1]
    ans = solve(n, k, s)
    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
a, b = map(int, input().split())
s = input()
ans = ""
for i in range(a):
    if(i == b-1):
        ans += s[i].lower()
    else:
        ans += s[i]
print(ans)

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

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

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

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

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

Solution (Python):

import itertools
from collections import Counter
from collections import defaultdict
import bisect

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

if __name__ == '__main__':
    main()

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())
string = input()

mojiretu_list = [0 for _ in range(N)]
for i in range(N):
    mojiretu_list[i] = string[i]

if mojiretu_list[k-1] == 'A':
    mojiretu_list[k-1] = 'a'

if mojiretu_list[k-1] == 'B':
    mojiretu_list[k-1] = 'b'

if mojiretu_list[k-1] == 'C':
    mojiretu_list[k-1] = 'c'

ans = ''
for i in range(N):
    ans += mojiretu_list[i]

print(ans)

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

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


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

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

Solution (Python):
a,b=map(int,input().split(" "))
s=input()
l=""
for j,i in enumerate(s):
  if j!=b-1:
    l=l+i
  else:
    l=l+i.lower()
print(l)

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

for i in range(N):
    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()
t = list(s)

s = s.lower()

t[k-1] = s[k-1]

print("".join(t))

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

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

print(''.join(Ss))

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 = input()
for i, x in enumerate(S):
    if i+1 == K:
        print(x.lower(), end="")
    else:
        print(x, 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=input()
print(s[:k-1]+s[k-1].lower()+s[k:])

Solution (Python):
n,k = [int(u) for u 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 = input()

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

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

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

print(low)

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

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

Solution (Python):





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


if __name__ == '__main__':
    main()

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

string = ''
for i in range(len(s)):
    if i+1 == k:
        string += s[i].lower()
    else:
        string += s[i]
print(string)

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

Solution (Python):
n, k = [int(item) for item in input().split()] 
k -= 1
s = input().rstrip()

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

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

Solution (Python):



def solv(n, k, s):
    s = [c for c in s]
    s[k-1] = s[k-1].lower()
    return "".join(s)


if __name__ == '__main__':

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

    ans = solv(n, k, s)

    print(ans)

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

line = input()

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

print(ans)

Solution (Python):
N, M = map(int, input().split())
S = list(input())
S[M-1] = str.lower(S[M-1])
print("".join(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"
else :
    s[k-1] = "c"
print("".join(s))

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

Solution (Python):
def getlist():
	return list(map(int, input().split()))

N, K = getlist()
K -= 1
S = input()
if S[K] == "A":
	print(S[:K] + "a" + S[K + 1:])
elif S[K] == "B":
	print(S[:K] + "b" + S[K + 1:])
else:
	print(S[:K] + "c" + S[K + 1:])

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

Solution (Python):
import sys
sys.setrecursionlimit(20000000)

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

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

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

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

i = 1
r = ""
for char in S:
    if(i == K):
        char = char.lower()
    r += char
    i += 1
print(r)

Solution (Python):
n, k = list(map(int, input().split()))
a = input()
tmp = ""
for i in range(n):
    t = a[i]
    if i == k-1:
        t = t.lower()
    tmp += t
print(tmp)

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

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

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

Solution (Python):
n,k = [int(i) for i 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 = input()
a,b,c = s[:k-1], s[k-1], s[k:]
print(a+b.lower()+c)

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):
def main():
	N, K = map(int, input().split())
	S = input()
	ans = S
	if K > N-1:
		ans = S[:K-1]+S[K-1:].lower()
	elif K > 1:
		ans = S[:K-1]+S[K-1:K].lower()+S[K:]
	else:
		ans = S[:1].lower()+S[1:]
	print(ans)


if __name__ == '__main__':
	main()

Solution (Python):
import sys


def parse(file):
    n, k = map(int, file.readline().split())
    s = file.readline()
    return n, k, s


def main(n, k, s):
    orig = s[k-1]
    return s[:k-1] + str.lower(orig) + s[k:]

if __name__ == '__main__':
    print(main(*parse(sys.stdin)))

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

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

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

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

print(st)

Solution (Python):

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

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

Solution (Python):
a=list(map(int,input().split()))

b=[i for i in input()]
n=a[1]-1
tmp=b[n]
if tmp=="A":
    b[n]="a"
if tmp=="B":
    b[n]="b"
if tmp == "C":
    b[n]="c"
    
    
print("".join(b))

Solution (Python):
N, K = map(int, input().split())
S = input()
S_ = ""
for i in range(N):
    if i == K-1:
        S_ += S[i].lower()
    else:
        S_ += S[i]
    
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'
else:
  S[K-1] = 'c'
print(''.join(S))

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

ans = ''.join([s[i].lower() if i == k - 1 else s[i] for i in range(n)])
print(ans)

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

Solution (Python):
import numpy as np
import math

def main():
    n, k = map(int, input().split())
    string = input()
    new_string = ""
    for i in range(len(string)):
        if i == k - 1:
            new_string += string[i].lower()
        else:
            new_string += string[i]
    print(new_string)

if __name__ == '__main__':
    main()

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


A, B = map(int, input().split())
S = input()


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

Solution (Python):
n,k=list(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())
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+1 == K:
        ans += S[i].lower()
    else:
        ans += S[i]
print(ans)

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())
s[k-1] = s[k-1].lower()
print(''.join(s))

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

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 = list(map(int, input().split()))
S = input()

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

print(T)

Solution (Python):
A, 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 = 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().strip()
S_replaced = "".join(c.lower() if i == K else c for i, c in enumerate(S, start=1))
print(S_replaced)

Solution (Python):
n, k = list(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()

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

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

S = input()

pre = S[0:K-1]

behind = S[K:]

new = pre+S[K-1].lower() + behind

print(new)

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

Solution (Python):
from sys import stdin

N, K = (int(i) for i in input().split())
S = input()
print(S[0:K-1]+S[K-1:K].lower()+S[K:N])

Solution (Python):
_,K = map(int,input().split())
s = input()
a = ""
for i in range(len(s)):
  if i is K-1:
    a += s[i].lower()
  else:
    a += s[i]
print(a)

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 = list(map(int, input().split()))
s = input()
ans = s[:k-1]+s[k-1].lower()+s[k:]
print(ans)

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

A = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
a = "abcdefghijklmnopqrstuvwxyz"

ans = S[0:K-1]+a[A.index(S[K-1])]+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 = input()
a = s[k-1].lower()
print(s[:k-1] + a + s[k:])

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

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

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

Solution (Python):
import sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def II(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def SI(): return input()
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')

N, K  = LI()
S = SI().strip()

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

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

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

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

Solution (Python):
N,K = map(int,input().split())
S = input()
print(S[:K-1] + chr(ord(S[K-1]) + 32) + 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 = input().strip()
s = list(S)
s[K-1] = s[K-1].lower()
print("".join(s))

Solution (Python):
N, K = [int(x) for x in input().split()]
S = [s for s in input()]

t = S.pop(K-1)
if t == "A":
  S.insert(K-1, "a")
elif t == "B":
  S.insert(K-1, "b")
else:
  S.insert(K-1, "c")
S = "".join(S)
print(S)

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

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

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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

print("".join(S))

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

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

if __name__ == '__main__':
    main()

Solution (Python):


import sys


s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N, K = i2nn()
    S = i2s()
    K -= 1
    s = S[:K] + S[K:K+1].lower() + S[K+1:]
    print(s)

main()

Solution (Python):
n,k=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 = str(input())

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

if __name__ == '__main__':
	import sys
	sys.exit(main())

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

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

if K == 1:
    S = S[0].lower() + S[1:]
elif K == N:
    S = S[:-1] + S[N-1].lower()
else:
    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()
print(''.join(s))

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

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

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

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

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

print(out_str)

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()
S=s.lower()
print(s[:K-1]+S[K-1:K]+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):
def solve():
  N, K = map(int, input().split())
  S = list(input())
  S[K - 1] = S[K - 1].lower()
  return ''.join(S)

print(solve())

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


out = ""
i = 1
for char in s:
    if i == k:
        out += char.lower()
    else:
        out += char
    i += 1

print(out)

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()
S = s[: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):


import sys
input = sys.stdin.readline



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

for i, s in enumerate(S) :
    print(s.lower() if i == K - 1 else s, end="")

print()

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

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

Solution (Python):
a,b=(map(int, input().split()))
N=input()
arr=""
for num,i in enumerate(N):
    if num+1==b:
        arr+=i.lower()
    else:
        arr+=i
print(arr)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

mi = lambda: map(int, input().split())
s  = lambda: input()

N, K = mi()
S = s()

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

Solution (Python):
N, K =map(int, input().split())
S = input()
S=list(S)
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):
N, K = map(int,input().split())
S = str(input())

if K == 1:
  ans = S[0].lower() + S[1:]
elif K == N:
  ans = S[:N-1] + S[N-1].lower()
else:
  ans = S[:K-1] + S[K-1].lower() + S[K:]
  
print(ans)

Solution (Python):
def main():
    n, k = [int(e) for e in input().split()]
    s = input()
    s = '{}{}{}'.format(s[:k - 1], s[k - 1].lower(), s[k:])
    print(s)


if __name__ == "__main__":
    main()

Solution (Python):



def main():
    n, k = list(map(int, input().split()))
    s = input()
    result = ''
    for i, st in enumerate(s):
        if i == k-1:
            result += st.lower()
        else:
            result += st
    print(result)


if __name__ == '__main__':
    main()

Solution (Python):
n,k=map(int,input().split())
s=str(input())
k = k-1
head = s[:k]
tail = s[k+1:]
mid = s[k]
if mid == "A":
    print(head+"a"+tail)
elif mid == "B":
    print(head+"b"+tail)
else:
    print(head+"c"+tail)

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

S2 = [S[i].lower() if i == K-1 else S[i] for i in range(N)]

print(''.join(S2))

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

for i in range(n):
    if (i == k - 1):

        res += s[i].lower()
    else:

        res += s[i]

print(res)

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'
T = ''.join(S)
print(T)

Solution (Python):
from sys import exit

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

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):
import sys

a = []
for l in sys.stdin:
    a.append(l)

sent = a[1]
num = int(a[0].split()[1]) - 1
new_sent = [each_char for each_char in sent]
new_sent[num] = new_sent[num].lower()
new_sent = ''.join(new_sent)
print(new_sent)

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

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

print(s)

Solution (Python):


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

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

print("".join(ans))

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
input = sys.stdin.readline
 


 
def main():
	N, K = map(int, input().split(" "))
	S = input()
	S = S[:-1]
	S = list(S)

	K = K-1

	if S[K] == "A":
		S[K] = "a"
	elif S[K] == "B":
		S[K] = "b"
	elif S[K] == "C":
		S[K] = "c"

	ans = ""
	for i in S:
		ans += i
	print(ans)
		

if __name__ == "__main__":
	main()

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

ans = ""

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

print(ans)

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

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

Solution (Python):



import sys

input = sys.stdin.readline

def main():
    n, k = [int(e) for e in input().split(" ")]
    s = ""
    for i, r in enumerate(input()):
        if i == k-1:
            s += r.lower()
        else:
            s += r
    print(s)

main()

Solution (Python):
n, k = (int(_) for _ in 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 = str(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 = list(input())

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

print(''.join(S))

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

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

Solution (Python):



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

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

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

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()
T = S.lower()
print(S[0:K - 1] + T[K - 1] + S[K:])

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

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

Solution (Python):
large = ['A', 'B', 'C']
small = ['a', 'b', 'c']

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

s[index-1] = small[large.index(s[index-1])]

out = ''
for letter in s:
    out = out + letter

print(out)

Solution (Python):
n, k = map(int, input().split())
listS = list(input())
if k == 0:
    print(listS[0].lower()+"".join(listS[1:]))
elif k == n:
    print("".join(listS[:n-1])+listS[n-1].lower())
else:
    print("".join(listS[:k-1])+listS[k-1].lower()+"".join(listS[k:]))

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

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()


ret=s[0:k-1]+s[k-1].lower()+s[k:n]
print(ret)

Solution (Python):
N, K = tuple([int(x) for x in input().split(' ')])
S = list(input())

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

print(''.join(S))

Solution (Python):
a = list(map(int, input().split()))
b = str(input())
ji=b[a[1]-1].lower()
print(b[0:a[1]-1]+ji+b[a[1]:])

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=[i for i in S]
S[K-1]=S[K-1].lower()
ans=""
for i in range(N):
    ans+=S[i]
print(ans)

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()

k = k-1

result = s[:k] + s[k].lower() + s[k+1:]

print(result)

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

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

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

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