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

S = input()

s_dic = {"A":"a", "B":"b", "C":"c", "D":"d",
         "E":"e", "F":"f", "G":"g", "H":"h",
         "I":"i", "J":"j", "K":"k", "L":"l",
         "M":"m", "N":"n", "O":"o", "P":"p", "Q":"q",
         "R":"r", "S":"s", "T":"t", "U":"u",
         "V":"v", "W":"w", "X":"x", "Y":"y", "Z":"z"
        }

output = ""
for i in range(len(S)):
    if i == K - 1:
        output += s_dic[S[i]]
    else:
        output += S[i]

print(output)

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

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

Solution (Python):
N, K = map(int, input().split())
S = list(input())
K -= 1
S[K] = S[K].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()
 
ans = S[:K-1] + S[K-1].lower() + S[K:]
print(ans)

Solution (Python):
from string import ascii_lowercase, ascii_uppercase

n, k = map(int, input().split())
s = input()
d = dict(zip(ascii_uppercase, ascii_lowercase))
print(s[:k - 1] + d[s[k - 1]] + s[k:])

Solution (Python):
import os, sys, re, math

n,k = [int(s) for s in input().split(' ')]
s = input()

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

Solution (Python):


m,n=map(int,input().split(" "))
s=input()
ans=""
for i in range(m):
    t=s[i]
    if(i==n-1):
        t=s[i].lower()
    ans+=t
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'


print(''.join(S))

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

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

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

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

for i in range(N):
    if i == K-1:
        s.append(a)
    else:
        s.append(S[i])

print(''.join(s))

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):
NK = [int(i) for i in input().split()]
S = input()
low = S[NK[1] - 1].lower()
answer = ""
for i in range(NK[0]):
    if(i == NK[1] - 1):
        answer += low
    else:
        answer += S[i]
print(answer)

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=(int(x) for x in input().split())
A=list(input())

if A[K-1]=='A':
    A[K-1]='a'
if A[K-1]=='B':
    A[K-1]='b'
if A[K-1]=='C':
    A[K-1]='c'
print(''.join(A))

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

line[k - 1] = line[k-1].swapcase()

print("".join(line))

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

d = {"A":"a", "B":"b", "C":"c"}
s[k-1] = d[s[k-1]]
print("".join(s))

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

for i, _ in enumerate(S):
    if i == K-1:
        newS += S[i].lower()
    else:
        newS += S[i]

print(newS)

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

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


arr = input().split(' ')
N = int(arr[0])
K = int(arr[1])
K = K-1
S = input()
bef = S[:K]
aft = S[K+1:]
ans = bef + S[K].lower() + aft
print(ans)

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

ans = ''
i = 1
for s in S:
    if i == K:
        ans += s.lower()
    else:
        ans += s
    i += 1

print(ans)

Solution (Python):


import sys

input = sys.stdin.readline
n, k = map(int, input().split())
s = input().strip()
l = list(s)
l[k - 1] = l[k - 1].lower()
t = "".join(l)
print(t)

Solution (Python):


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

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

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(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 = list(input())
if S[K-1] == "A":S[K-1] = "a"
if S[K-1] == "B":S[K-1] = "b"
if S[K-1] == "C":S[K-1] = "c"
print("".join(S))

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

s[k-1]=s[k-1].swapcase()
s="".join(s)
print(s)

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

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


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

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

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

print(a)

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

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

print(hoge)

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


if __name__ == '__main__':
    solve()

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

Solution (Python):
*D, = open(0)
n, k = map(int, D[0].split())
s = D[1]
ret = []
for i, it in enumerate(s):
    if i == k-1:
        c = s[i].lower()
    else:
        c = s[i]
    ret.append(c)
print(''.join(ret))

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

S = input()

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

print(replaced_S)

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

import string
for i in range(26):
    if S[K - 1] == string.ascii_uppercase[i]:
        S[K - 1] = string.ascii_lowercase[i]
        print(*S, sep='')
        exit()

Solution (Python):




import sys


class math:
    
    pi = 3.14159265358979323846264338

    
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

math = math()


class output:
    
    def list(self, l):
        l = list(l)
        print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()















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

K -= 1

print(S[:K],end="")
print(S[K:K+1].lower(),end="")
print(S[K+1:])

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

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

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

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

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

Solution (Python):


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

str_list = list(c)
index = b - 1
str_list[index] = str_list[index].lower()
str_changed = "".join(str_list)
print(str_changed)

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"
if str_list[K-1] == "B":
    str_list[K-1] = "b"
if str_list[K-1] == "C":
    str_list[K-1] = "c"
ans = "".join(str_list)
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 = map(int, input().split())
S = input()

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

Solution (Python):
n,k = map(int, input().split())
s=input()
ans=''
for i in range(len(s)):
    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 = list(input().rstrip())

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

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

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

print(s2)

Solution (Python):

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

S = input()

x = S[K-1]

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

print(XX)

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

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

if S[listNK[1]-1]=="A":
    S[listNK[1]-1] = "a"
if S[listNK[1]-1]=="B":
    S[listNK[1]-1] = "b"
if S[listNK[1]-1]=="C":
    S[listNK[1]-1] = "c"

output = ""
for i in range(listNK[0]):
    output = output + S[i]

print(output)

Solution (Python):
import math

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

for i in range(A):
    if i + 1 == B:
        print(S[i].lower(), end="")
    else:
        print(S[i], end="")

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

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


if __name__ == '__main__':
    [n, k] = li()
    s = input()
    output = ""
    for index, si in enumerate(s):
        if index + 1 == k:
            output = output + si.lower()
        else:
            output = output + si
    print(output)

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

if k == 1:
  s = s[:1].lower() + s[1:]
elif k == n:
  s = s[:-1] + s[-1:].lower()
else:
  s = s[:k-1] + s[k-1:k].lower() + s[k:] 
  
print(s)

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

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

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

print("".join(s))

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

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

    print(s)
if __name__ == "__main__":
    main()

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

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

Solution (Python):
chars = {'A': 'a', 'B': 'b', 'C': 'c'}
line = [int(x) for x in input().split(' ')]
s = input()
i = 1
for c in s:
    if i == line[1]:
        print(chars[c], end='')
    else:
        print(c, end='')
    i = i + 1
print()

Solution (Python):
n_k = input().split()
s = input()
print(s[0:int(n_k[1]) - 1]+s[int(n_k[1]) -
                             1].lower() + s[int(n_k[1]):])

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 = [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()
h = 'o'
if S[k-1] == 'A':
  h = 'a'
elif S[k-1] == 'B':
  h = 'b'
else:
  h = 'c'
print(S[:k-1]+h+S[k:])

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

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

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

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

Solution (Python):
import sys
from fractions import gcd
from functools import reduce
from itertools import combinations

import numpy as np

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    A, B = il()
    N = ii(str)
    a = []
    for i in range(A):
        a.append(N[i].lower() if i == B - 1 else N[i])
    return "".join(a)


if __name__ == "__main__":
    print(solve())

Solution (Python):


n, k = list(map(int, input().split()))
s = input()
ans = ''
for i, c in enumerate(s):
    if i == k-1:
        ans += c.lower()
    else:
        ans += c

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()
ret = ""
for i, c in enumerate(s):
  ret += c.lower() if i == k-1 else c 
print(ret)

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

Solution (Python):
n,k = list(map(int,input().split()))
s=str(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'
if s[k-1] == 'B':
    s[k-1] = 'b'
if s[k-1] == 'C':
    s[k-1] = 'c'

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

Solution (Python):


def solve():
    N, K = list(map(int, input().split()))
    S = input()
    
    ans = ""
    for i in range(N):
        if i == K-1:
            ans += S[i].lower()
            continue
        ans += S[i]
    print(ans)

if __name__ == "__main__":
    solve()

Solution (Python):

n, k = map(int, input().split())
s = list(input())
data = {'A': 'a', 'B': 'b', 'C': 'c'}
tmp = s[k - 1]
s[k - 1] = data[tmp]
print(''.join(map(str, s)))

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

l1=['A','B','C']
l2=['a','b','c']

sl = list(s)

sl[K-1] = l2[l1.index(s[K-1])]

print(''.join(sl))

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

for i in range(N):
  if(i == K - 1):
    if(S[i] == 'A'):
      print('a',end='')
    elif(S[i] == 'B'):
      print('b',end='')
    else:
      print('c',end='')
  else:
    print(S[i],end='')

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

s = input()

ans = ""

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

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

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

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

print(S)

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

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

Solution (Python):
N, K = [int(i) for i in 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 = [int(i) for i in input().split()]
S = input()
res = ""
for i,ch in enumerate(S):
    if i == K - 1:
        res += ch.lower()
    else:
        res += ch
print(res)

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

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

S[K-1] = s_

print(''.join(S))

Solution (Python):
def main():
    n, k = list(map(int, input().split()))
    s = input().strip()
    result = s[0:k - 1] + s[k - 1].lower() + (s[k:] if k < n else '')
    print(result)


main()

Solution (Python):
N,K = map(int, raw_input().split())
S = raw_input()
i = 0
S2 = ""
for c in S:
	i += 1
	if(i == K):
		if c =='A':
			S2 += 'a'
		elif c == 'B':
			S2 += 'b'
		elif c == 'C':
			S2 += 'c'
	else:
		S2 += c
print(S2)

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

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

print(nS)

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

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


def solve(N, K, S):
    return S[:K-1] + S[K-1].lower() + S[K:]


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))

Solution (Python):
n, k = map(int, input().split())
s = list(str(input()))
result = ""
for index, char in enumerate(s):
    if index == k - 1:
        result += char.lower()
    else:
        result += char

print(result)

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 = ''.join(si if i+1 != K else si.lower() for i, si in enumerate(S))
print(s)

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

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

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

print(s[:k-1]+ans+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()

S = [s.lower() if (i == K-1) else s for i, s in enumerate(S)]

print("".join(S))

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

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

str = str[0:k-1] + change.lower() + str[k:n]

print(str)

Solution (Python):
i = int(input().split()[1]) - 1
s = input()
ss = s[i].lower()
ans = ''
for j, sj in enumerate(s):
    if i == j:
        ans += ss
    else:
        ans += sj
print(ans)

Solution (Python):

a=list(map(int,input().split(" ")))
s=input()
for i,it in enumerate(s):
    if i+1==a[1]:
        print(chr(ord(it)-ord('A')+ord('a')),end="")
    else:
        print(it,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()

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

if K == len(S):
    result = S[0:K-1] + small
elif K == 1:
    result = small + S[1:]
elif K != 1:
    result = S[0:K-1] + small + S[K:]

print(result)

Solution (Python):
n,k=map(int,input().split())
s=input()
ls=[c for c in s]
for i in range(n):
    if i==k-1 and s[i]=='A':
        ls[i]='a'
    elif i==k-1 and s[i]=='B':
        ls[i]='b'
    elif i==k-1 and s[i]=='C':
        ls[i]='c'
ss = ''.join(ls)
print(ss)

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

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

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

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

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

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

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):
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('\n', end='')

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

Solution (Python):
import sys
stdin = sys.stdin
def ls(): return stdin.readline()

def li(): return map(int, stdin.readline().split())
N, K = tuple(li())
S = ls()
sl = []
for i, c in enumerate(S):
    if i == K -1:
        sl.append(c.lower())
    else:
        sl.append(c)

print(''.join(sl))

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


S = list(input())


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

for chara in S:
    print(chara, 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()
a=s[k-1]
a=a.lower()
l=''
if k==1:
  l+=a
  l+=s[k:]
  print(l)
elif k<n:
  l+=s[:k-1]+a+s[k:]
  print(l)
else:
  l+=s[:k-1]+a
  print(l)

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

Solution (Python):

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

s0 = s[:(k-1)]
s1 = s[k-1].lower()
s2 = s[k::]

print(s0+s1+s2)

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

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

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

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

ss=ss.lower()

s[k-1] = ss
print("".join(s))

Solution (Python):

N, a = map(int,input().split())
moji = input()
new = moji[:a-1] + moji[a-1].lower() + moji[a:]
print(new)

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

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

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

Solution (Python):
X = {}
X["A"] = "a"
X["B"] = "b"
X["C"] = "c"

N, K = map(int, input().split())
s = input()
print(s[:K-1] + X[s[K-1]] + s[K:])

Solution (Python):
def main():
    N, K = map(int, input().split())
    S = input()
    print(replace(S, K))


def replace(S, K):
    if S[K-1] == 'A':
        return S[:K-1] + 'a' + S[K:]
    elif S[K-1] == 'B':
        return S[:K-1] + 'b' + S[K:]
    else:
        return S[:K-1] + 'c' + S[K:]


if __name__ == '__main__':
    main()

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 = [int(item) for item in 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] = chr(ord(a[k-1]) + ord('a') - ord('A'))
print(''.join(a))

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

Solution (Python):
def resolve():
    N, K = map(int, input().split())
    S = input()
    S_ = []
    for i in range(N):
        a = S[i]
        if i != K - 1:
            S_.append(a)
        else:
            S_.append(a.lower())

    S_ = ''.join(S_)
    print(S_)

resolve()

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

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

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 = input()
f = s[:k-1]
b = s[k-1:]
b = b.title().swapcase()
print(f + b)

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

s = S.lower()

ans =""
for i in range(N):
    if i==K-1:
        ans += s[i]
    else:
        ans += S[i]


print(ans)

Solution (Python):

import sys

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

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

if __name__ == '__main__':
    main()

Solution (Python):
n,k = map(int,input().split())
s = input()
moji = ''
for N in range(n):
        if N == k - 1:
                if s[N] =='A':
                        moji += 'a'
                if s[N] =='B':
                        moji += 'b'
                if s[N] =='C':
                        moji += 'c'
        else:
                moji += s[N]

print(moji)

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

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

ans=S[0:K-1] + s + S[K:]


print(ans)

Solution (Python):
N, K = [int(x) for x in 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=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"
elif S[K-1] == "C": S[K-1] = "c"
print("".join(S))

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

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

Solution (Python):
N, K = map(int, input().split())
S = input()
s = [ord(c) for c in S]
s[K-1] += 32
for c in s:
    print(chr(c), end="")
print()

Solution (Python):
n,k = list(map(int,input().split()))
s = input()
t = ''
for i in range(n):
  if i != k-1:
    t += s[i]
  else:
    if s[k-1] == 'A':
      t += 'a'
    elif s[k-1] == 'B':
      t += 'b'
    else:
      t += 'c'
print(t)

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits



def input(): return sys.stdin.readline().strip()


def INT(): return int(input())


def MAP(): return map(int, input().split())


def LIST(): return list(map(int, input().split()))



sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

n, k = MAP()

s = list(input())



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

s=''.join(s)

print(s)

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

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

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

s = S[0]

for i in range(N-1):
    s += S[i+1]

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

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

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

Solution (Python):
import sys

readline = sys.stdin.readline

N, K = map(int, readline().split())
S = readline().rstrip()

c = S[K - 1]
c_ = chr(ord('a') + (ord(c) - ord('A')))

s = [c for c in S]
s[K - 1] = c_
print(''.join(s))

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

print("".join(S))

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

cdict = {"A":"a","B":"b","C":"c"}
print(S[:K-1] + cdict[S[K-1]] + S[K:])

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

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

Solution (Python):
N, K = map(int, raw_input().split())
S = list(raw_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):
def main():
  inp = input()
  temp = inp.split()
  N = int(temp[0]); K = int(temp[1])
  S = input()
  lower = S[K-1].lower()
  ans = S[:K-1] + lower + S[K:]
  print(ans)
  
if __name__ == "__main__":
  main()

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