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

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

print(s[0:k-1] + tar + s[k:n+1])

Solution (Python):
firstLine = input()


N = int(firstLine.split()[0])

K = int(firstLine.split()[1]) - 1


S = list(input())

if S[K] == 'A' or S[K] == 'B' or S[K] == 'C':
    S[K] = S[K].lower()
else:
    S[K] = S[K].upper()

print(''.join(S))

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

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

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

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

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

ans = input_str[0:k-1] + chr(ord(input_str[k-1]) + 32) + input_str[k:len(input_str)]
print(ans)

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

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

print(''.join(sList))

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

sList=list(s)
sList[k-1]=sList[k-1].lower()
	
result=''
for i in range(n):
	result += sList[i]

print(result)

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

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

Solution (Python):
x, y = [int(i) for i in input().split()]
s = input()

print(s[0:y-1]+s[y-1].lower()+s[y:x])

Solution (Python):
_, p = map(int, raw_input().split())
p = p - 1
s = raw_input()
print s[:p] + s[p].lower() + s[p+1:]

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

res = ''
for i, ss in enumerate(s, 1):
    if i != K:
        res += ss
    else:
        res += ss.lower()
print(res)

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

Solution (Python):
N, K = map(int, input().split())
S = input()
for index, string in enumerate(list(S)):
    if index == K-1:
        print(string.lower(),end = '')
    else:
        print(string, end ='')

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

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

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

ss = {'A':'a', 'B':'b', 'C':'c'}
print(s[:k-1]+ss[s[k-1]]+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):
import sys 

_, K = sys.stdin.readline().split(" ")
K = int(K)
S = sys.stdin.readline()
print("".join([S[:K-1], S[K-1].lower(), S[K:]]))

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


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

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

N, K = inpl()
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):
from sys import stdin
n, k = [int(x) for x in stdin.readline().rstrip().split()]
s = stdin.readline().rstrip()
tmp = ''
if k >= 2:
    tmp = s[:k - 1]
s = tmp + s[k - 1].lower() + s[k:]
print(s)

Solution (Python):
N, K = map(int, input().split())
S = input().rstrip('\n')

K -= 1

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

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

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

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

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

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

Solution (Python):
n,k = (int(i) for i in 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 = 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):
N, K = map(int, input().split())
S = input()

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

answer = S[:K-1] + target + S[K:]

print(answer)

Solution (Python):
m,k=map(int,input().split())
s=input()
print(s[:k-1],end="")
print(chr(ord(s[k-1])+32),end="")
print(s[k:])

Solution (Python):
N,K = (int(x) for x in input().split())
S = input()
if 1 <= N <= 50 and 1 <=K <= N and len(S) == N :
    komoji = S[K-1:K].lower()

    Out = S[:K-1] + komoji + S[K:]

    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 = (int(x) for x in input().split())
s = input()
print(''.join([x if i != K-1 else x.lower() for i,x in enumerate(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 = list(input())
s[k - 1] = s[k - 1].lower()
print("".join(s))

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

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    n, k = LI()
    s = S()
    s[k-1] = s[k-1].lower()
    print("".join(s))

    return


def B():
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    A()

Solution (Python):
a = input().split()
N, K = int(a[0]), int(a[1])
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 = input()
ans = S[:K-1]+S[K-1].lower()+S[K:]
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()
s = list(S)
s[K-1] = {'A':'a','B':'b','C':'c'}[s[K-1]]
print(''.join(s))

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

s=S
s=str.lower(s)

ans=''

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

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"
S = "".join(S)
    
print(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):
def main():
    N, K = map(int, input().split())
    S = input()

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


if __name__ == '__main__':
    main()

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

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

def komoji(L):
    if L == "A":
        return "a"
    elif L == "B":
        return "b"
    else:
        return "c"

kotae = s[:k-1] + komoji(s[k-1]) + s[k:]
print(kotae)

Solution (Python):
N, K = map(int, input().rstrip().split())
S = input().rstrip()
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):
a,b = map(int,input().split())
c = input()
k = c[:b-1]+c[b-1].lower()
if a is not b:
  	k += c[b:]
print(k)

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

for i in range(len(S)):
    if i == k - 1:
        print(S[i].swapcase(), end="")
    else:
        print(S[i], end="")
print()

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

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

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

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

if k == 1:
  sTR = str[0] + STR[1:]
elif k == n:
  sTR = STR[:n-1] + str[n-1]
else:
  sTR = STR[:k-1] + str[k-1] + STR[k:]

print(sTR)

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

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

print(a)

Solution (Python):

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

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

Solution (Python):
N, K = [int(nk) for nk in input().split()]
S = input()
T = []
for n in range(N):
  T.append(S[n])
if T[K-1] == "A":
  T[K-1] = "a"
elif T[K-1] == "B":
  T[K-1] = "b"
else:
  T[K-1] = "c"
U = "".join(T)
print(U)

Solution (Python):

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

def up():
    global K,S
    return S[:K-1] + S[K-1].lower() + S[K:]

print(up())

Solution (Python):
import sys

def change(S, N, K):
    K-=1
    print S[:K] + S[K].lower() + S[K+1:]

if __name__ == '__main__':
    input = sys.stdin.read()
    inlst = input.split("\n")
    N, K =inlst[0].split()
    S = inlst[1]
    change(S, int(N), int(K))

Solution (Python):
len_word,n=map(int,input().split())
word=input()
print(word[:n-1]+word[n-1].lower()+word[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()

k -= 1
l = [c if i != k else c.lower() for i, c in enumerate(s)]
t = ''.join(l)

print(t)

Solution (Python):

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

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

Solution (Python):
def main():
    N, K = map(int, input().split())
    for i, s in enumerate(input()):
        if i == K - 1:
            s = s.lower()
        print(s, end='')


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

chrs[nums[1]-1] = chrs[nums[1]-1].lower()
for c in chrs:
    print(c, end="")

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

Solution (Python):
print((lambda n,s: ''.join([chr(ord(s[i])+32)if i==n[1]-1 else s[i]for i in range(n[0])]))(list(map(int,input().split())),input()))

Solution (Python):


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

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

Solution (Python):
'''input
4 3
CABA
'''

N, K = [int(x) for x in 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 = input()
print(S[:K-1] + S[K - 1].lower() + S[K:])

Solution (Python):
from sys import stdin

N, K = [int(x) for x in stdin.readline().rstrip().split()]
input_str = stdin.readline().rstrip()
if(K==1):
  str = input_str[0].lower()
else:
  str = input_str[0]
for i in range(1,N):
  if(i==K-1):
    str = str + input_str[i].lower()
  else:
    str = str + input_str[i]
print(str)

Solution (Python):
k,s=open(0);k=int(k[2:]);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 = 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 = 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=str(input())
s=s[:k-1]+s[k-1].lower()+s[k:]
print(s)

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

l=list(s)
l[k-1]=l[k-1].lower()
print(''.join(l[:n]))

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

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

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

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

print(s)

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

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

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

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

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

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy

def j(q):
    if q==1: print("Yes")
    elif q == 0:print("No")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)



x,y= (int(i) for i in input().split())       

a = input()                                  






for i in range(x):
    if i == y-1:
        print(a[i].lower(),end='')
    else:
        print(a[i],end='')

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

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

Solution (Python):
a,b=[int(i) for i in input().split()]
c=list(input())

c[b-1] = str.lower(c[b-1])

c = ''.join(c)

print(c)

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

if (s[k - 1] == 'A'):
    x = s[0:k - 1] + 'a' + s[k:n]
elif (s[k - 1] == 'B'):
    x = s[0:k - 1] + 'b' + s[k:n]
else:
    x = s[0:k - 1] + 'c' + s[k:n]
print(x)

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

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

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 = list(input())
K -= 1
S[K] = chr(ord(S[K]) + 32)
print("".join(S))

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

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

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

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

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):
k,s=open(0);k=int(k[2:]);print(s[:k-1]+s[k-1].lower()+s[k:])

Solution (Python):
l = input().split()
N = int(l[0])
K = int(l[1])
S = str(input())

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

for n in range(N):
    print(s_up[n], end='')

print()

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

s = ''

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

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

Solution (Python):
n, k = map(int, input().split())
k -= 1
s = input()
c = s[k]
s = s[:k] + chr(ord(c) - ord('A') + ord('a')) + s[k + 1:]
print(s)

Solution (Python):
import sys
input = sys.stdin.readline
n, k = map(int, input().split())
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):
import sys
n = list(map(int, input().split()))
s = list(input())
for i in range(len(s)):
    if i == n[1]-1:
        print(s[i].lower(),end='')
        continue
    print(s[i],end='')

Solution (Python):
from sys import stdin
input1 = stdin.readline().rstrip().split()
inputStr = stdin.readline().rstrip()
inputLength = int(input1[0])
changeIdx = int(input1[1]) - 1
    
if inputLength > 50 or changeIdx > inputLength or len(inputStr) != inputLength:
    print("Invalid Input Error")
    

if inputStr[changeIdx] == 'A' or inputStr[changeIdx] == 'B' or inputStr[changeIdx] == 'C' :
    print(inputStr[0 : changeIdx] + inputStr[changeIdx].lower() + inputStr[changeIdx + 1 : len(inputStr)])
else:
    print(inputStr[0 : changeIdx] + inputStr[changeIdx].upper() + inputStr[changeIdx + 1 : len(inputStr)])

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

Solution (Python):
n, k = map(int, input().split())
accept = input()
list = []
for i in range(n):
    list.append(accept[i])
if list[k-1] == "A":
    list[k-1] = "a"
elif list[k-1] == "B":
    list[k-1] = "b"
elif list[k-1] == "C":
    list[k-1] = "c"
    
ans = list[0]
for j in range(n-1):
    ans += list[j+1]
    
print(ans)

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

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

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

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

Solution (Python):
N=input().split(" ")
S=input().rstrip()
C=""
for i in range(len(S)):
  if i==int(N[1])-1:
    C += S[i].lower()
  else:
    C += S[i]
print(C)

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,m=map(int,input().split())
s=input()
s=s[:m-1]+chr(ord(s[m-1])-ord('A')+ord('a'))+s[m:]
print(s)

Solution (Python):



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

s = list(input())


a = s[k-1:k]

a = ','.join(a)

a = a.lower()

s[k-1:k] = a

s = ''.join(s)

print("{}".format(s))

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

a=K-1
p=N
c=B[a]

t=c.lower()
B[a]=t

for i in range(p):
    print(B[i],end="")

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 = input().split()
s = input()
sn = s[int(k)-1].lower()
num1 = int(k) - 1
num2 = int(k)
print(s[:num1] + sn + s[num2:])

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

if len(S) != N:
    print("error")

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

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

S_list = [S[:K-1], S[K - 1], S[K:]]

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

print(''.join(S_list))

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

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

print(S)

Solution (Python):
import sys
input = sys.stdin.readline
n, k = map(int, input().split())
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):
input1 = input()
input2 = input()

input1_splited = input1.split(" ")
n = input1_splited[0]
k = input1_splited[1]
s = input2
k = int(k) - 1
list = list(input2)
tochange = list[int(k)]
changed = tochange.lower()
list[k] = changed
result_str = "".join(list)
print(result_str)

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:]
else:
    s=s[:k-1]+"c"+s[k:]
print(s)

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

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

Solution (Python):

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

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

Solution (Python):
nums = input()
charas = input()
 
num = nums.split()
 
temp = int(num[1]) - 1
 
chara_1 = charas[ : temp]

chara_2 = charas[temp + 1 : ]
 
new_chara = charas[temp].lower()
 
print(chara_1 + new_chara + chara_2)

Solution (Python):
s = input().split()
t = input()
k = int(s[1]) - 1

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

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

s=list(s)

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

s="".join(s)

print s

Solution (Python):
data = input().split()
k = int(data[1])
st = input()
s = st[k-1].lower()
st = list(st)

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

Solution (Python):
nk_str = input()
string = input()
nk_list = nk_str.split()
k = int(nk_list[-1])
string_list = [c for c in string]
string_list[k - 1] = string_list[k - 1].lower()
string = ''.join(string_list)
print(string)

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

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

S =str(input())


v = S[:K-1]
w = S[K-1:K]
x = S[K:]


y = w.swapcase()

Z =v + y + x


print(Z)

Solution (Python):
a=input().split()
s=input()
b=s.lower()
s=s.upper()
N=int(a[0])
K=int(a[1])
list=[]
n=0
while True:
    if n==K-1:
        list.append(b[n])
    else:
        list.append(s[n])
    n=n+1
    if n==N:
        break
list1="".join(list)
print(list1)

Solution (Python):
import sys
from io import StringIO
import unittest


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


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3 1
ABC"""
        output = """aBC"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """4 3
CABA"""
        output = """CAbA"""
        self.assertIO(input, output)


if __name__ == "__main__":
    resolve()

Solution (Python):


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

Solution (Python):
n,k=map(int,input().split())
s=list(input())
t=chr(ord(s[k-1])+32)
s[k-1]=t
print(''.join(s))

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

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

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

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

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

for aa in result:
  print(aa,end="")

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

Solution (Python):
import numpy as np
import fractions

N,K = (input()).split(" ")
S = input()

N=int(N)
K=int(K)

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

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

Solution (Python):
n,k=input().split()
s=input()
N=int(n)
K=int(k)
S=str(s)
P=(S[K-1])
Q=P.lower()
T=S[:K-1]+Q+S[K:]
print(T)

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

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

for i in range(N):
    if i + 1 == K:
        print(L[i].lower(), end = "")
    else:
        print(L[i], end = "")
        
print()

Solution (Python):
n,k=map(int , input().split())
string=list(input())
result=[]
for i in range(n):
  if i==k-1:
    result.append(chr(ord(string[i])+32))
  else:
    result.append(string[i])
print(''.join(result))

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

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'
elif (S[K-1] == 'C'):
  S[K-1] = 'c'
  
ans = ''.join(S)
    
print(ans)

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

for x in range(0, N):
    if x == K - 1:
        print(S[x].lower(), end='')
    else:
        print(S[x], end='')

Solution (Python):


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

s = S[K-1:].capitalize()

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

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:]
else:
    s = s[:k-1] + 'c' + s[k:]
print(s)

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

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

d = c[b-1];
e = d.lower()

tmp = c[0:b-1]
tmp2 = c[b:len(c)]

print(tmp + e + tmp2)

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

items = []

for i, w in enumerate(S):
  items.append(w)
  if i == (K - 1): items[i] = w.lower()


ans = ''
for e in items: ans += e 

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

Solution (Python):
N,K = map(int,input().split())
S = input()
count = 1
for x in S:
    if count == K :
        print(x.lower(),end="")
        count += 1
        continue
    print(x,end="")
    count += 1
print()

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

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

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

S = list(S)
S[index] = s_char
print("".join(S))

Solution (Python):
n, k = map(int, input().split())
S = input()
l = len(S)
chr = S[k-1].lower()

Answer = S[0:k-1]+chr + S[k:l]

print(Answer)

Solution (Python):

import sys
def solve(lines):
    N,K = map(int, lines.pop(0).split(' '))
    S = lines.pop(0)
    print(S[:K-1] + S[K-1].lower() + S[K:])








lines = [x.strip() for x in sys.stdin.readlines()]




solve(lines)

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(x) for x 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].swapcase()
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()

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

print(t)

Solution (Python):
N, K = map(int, input().split())
S = list(input())
change = S[K-1]
S.pop(K-1)
change = change.lower()
if(K == N):
    S.append(change)
else:
    S.insert(K-1,change)
Snew = "".join(S)
print(Snew)

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

Solution (Python):


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

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