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):
import sys, os, math, bisect, itertools, collections, heapq, queue

from decimal import Decimal
from collections import defaultdict



sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)


MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N, K = il()
    S = iss()
    ret = ""
    for n in range(N):
        if n + 1 == K:
            ret += str(S[n]).lower()
        else:
            ret += S[n]
    print(ret)


if __name__ == '__main__':
    main()

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

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

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

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

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

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

print(a)

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

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

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

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

Solution (Python):
n,k=map(int,input().split())
s = input()
 
s = list(s)
s[k - 1] = s[k-1].lower()
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):
n,k=map(int, input("").split(' '))
assert n>=k>=1
assert 1<=n<=50

s=input('')
assert ("a","b","c" in s)

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

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

Solution (Python):
n,k=map(int, input("").split(' '))
assert n>=k>=1
assert 1<=n<=50

s=input('')
assert ("a","b","c" in s)

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

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

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



d=a-b+1
c = list(c)
d = c[b-1]
c[b-1] = d.lower()

c = "".join(c)
print(c)

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

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

Solution (Python):
nk = input().split()
index = int(nk[1]) -1
s = input()
c = 0
for i in s:
  if c == index: print(i.lower(),end="")
  else: print(i,end="")
  c+= 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=list(input())
s[k-1]=s[k-1].lower()
print("".join(s))

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
mod = 10**9 + 7

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):
X=input()
X=X.split()
str=input()
ans=int(X[1])-1
exact=str[ans].lower()
before=str[0:ans]
after=str[ans+1:]
print(before+exact+after)

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

s[k-1] = chr(ord(s[k-1]) - ord('A') + ord('a'))
for c in s:
	print(c, end="")

Solution (Python):


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

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

print(ans)

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

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

Solution (Python):
N, K = list(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 = 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()
a = int(n)
b = int(k)
s = input()
result = ''
for i in range(a):
    if i == b-1:
        result += chr(ord(s[i]) + 32)
    else:
        result += s[i]
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())
string = str(input())
arr = list(string)
arr[k-1] = arr[k-1].lower()
print(*arr, sep="")

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


if __name__ == '__main__':
    solve()

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())
S = list(input())
S[K-1] = S[K-1].lower()
print(''.join(S))

Solution (Python):
import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
N,K = [res[i] for i in (0,1)]
S=sys.stdin.readline(N)
K-=1
if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z)

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


print(ans)

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


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


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):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n, k = M()
s = S()
ans = ''
for i in range(1, n+1):
    c = s[i-1]
    if i == k:
        c = c.lower()
    ans += c
print(ans)

Solution (Python):
x,y = [int(x) for x in input().split()]
z = input()
print(z[:y-1]+z[y-1].lower() + z[y:])

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

s[k-1] = s[k-1].lower()
print(*s, sep='')

Solution (Python):
N = input()
S = input()
N += "."
f = N.find(" ")
N1 =((N[0:f]))
K =(N[f+1:-1])
N1= int(N1)
S = S[0:N1+1]
S += "."
K= int(K)-1
s = (S[K:K+1])
s= s.lower()
print(S[0:K]+s+S[K+1:-1])

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

Solution (Python):
cases  = [int(i) for i in input().split() if i.isdigit()]
w = input()
print(w[0:cases[1]-1] + w[cases[1]-1].lower() + w[cases[1]:])

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

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

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

Solution (Python):
n,k=[int(x) for x in input().rstrip().split()]
s=[i for i in input()]
ans=""
s[k-1]=s[k-1].lower()
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())
s[k-1] = s[k-1].lower()
print("".join(s))

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

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

for i in range(N):
    print(S[i],end="")

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

Solution (Python):
N,X=map(int,input().split())
arr=list(map(str,input()))

arr[X-1]=arr[X-1].lower()


print("".join(arr))

Solution (Python):
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())
c = input()

print(c[:b-1] + c[b-1].lower() + c[b:])

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

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

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    n, k = geta(int)
    s = gete()

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

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

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

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

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n, k = map(int, input().split())
    s = list(input()[:-1].decode())
    s[k - 1] = s[k - 1].lower()
    print(*s, sep='')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

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

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

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

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


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


if __name__ == '__main__':
    solve()

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

print(ans)

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

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

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

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

print(new)

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

Solution (Python):
import math
def ip():return int(input())
def inp():return map(int,input().split())
def linp():return list(map(int,input().split()))

n,k=inp()
s=[x for x in input()]
s[k-1]=chr(ord(s[k-1])+32)
for x in s:print(x,end="")

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

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 = input()
s = list(s)
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():
    n,k = map(int, input().split())
    s = input()
    a = s[k-1].lower()
    b=list(s)
    b[k-1]=a
    s="".join(b)
    print(s)
main()

Solution (Python):
n,k=[int(x) for x in 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()
S = S[:K-1] + str.lower(S[K-1]) + 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=str(input())
s=list(s)
s[k-1]=str.lower(s[k-1])
print("".join(s))

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

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

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

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

Solution (Python):
n,k=map(int,input().split())
s=input()
s=s[:k-1]+s[k-1].lower()+s[k:]
print(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()
S2=S.lower()
S3=''

for i in range(N):
  if i==K-1:
    S3+=S2[i]
  else:
    S3+=S[i]
    
print(S3)

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

part1 = s[:k - 1]
part2 = s[k - 1].lower()
part3 = s[k:]


print('{part1}{part2}{part3}'.format(part1=part1, part2=part2, part3=part3))

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

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

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
n,k = map(int,input().split())
s = input()
kb = ''
if k >= 2:
  kb = s[:k-1]
kk = s[k-1]
ka = ''
if k < len(s):
  ka = s[k:]

if kk == 'A':
  print(kb + 'a' + ka)
  exit()
if kk == 'B':
  print(kb + 'b' + ka)
  exit()
if kk == 'C':
  print(kb + 'c' + ka)
  exit()

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

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

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

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

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

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

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

Solution (Python):
def main():
    n, m = map(int, input().split())
    s = list(input())
    s[m - 1] = s[m - 1].lower()
    print(''.join(s))
if __name__ == '__main__':
    main()

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

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

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

    print(''.join(S))


resolve()

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

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

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

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

s = list(s)

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

Solution (Python):
def main():
  num = list(map(int,input().split()))
  s=input()
  print(s[0:num[1]-1]+s[num[1]-1].lower()+s[num[1]:num[0]])
main()

Solution (Python):

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

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

s = s[0:k-1] + tmp + s[k:]

print(s)

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

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

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()
ans=[]
t = s[k-1].lower()
for i in range(0,k-1):
  ans += s[i]
ans+= t
for i in range(k,n):
  ans+=s[i]
print(''.join(ans))

Solution (Python):
from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n, k = LI()
s = S()
c = s[k - 1].lower()
print(s[:k - 1] + c + 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())
s = list(input())
s[k-1] = chr(ord(s[k-1])+32)
print(*s,sep="")

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

T = [s for s in S]
T[K - 1] = T[K - 1].lower()
print("".join(T))

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

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

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

Solution (Python):
from sys import stdin
def S(): return stdin.readline().rstrip()
def LI(): return list(map(int,stdin.readline().rstrip().split()))

tmp = LI()
n,k = [tmp.pop(0) for _ in range(2)]
s = list(S())
k -= 1
l = {'A':'a', 'B':'b', 'C':'c'}

s[k] = l[s[k]]

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

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

Solution (Python):
a,b=map(int,input().split())
for i,s in enumerate(input()):
  if i == b-1:
    s = chr(ord(s)+32)
  print(s,sep='',end='')

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

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

n,k = intMap()
s = input()

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

Solution (Python):
x, y = map(int, input().split())
z = list(input())
z[y-1] = z[y-1].lower()
print("".join(z))

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

S[k-1] = S[k-1].lower() 
S = "".join(S)
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):
import re
a = input()
b = input()
c = re.search('(\d+)\s(\d+)', a)
d = int(c.group(1))
e = int(c.group(2))
result = ''
for n in range(d):
    if n == e - 1:
        r = str(b[n]).lower()
        result += r
    else:
        result += b[n]
print(result)

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

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

Solution (Python):
n,k=map(int,input().split())
s=input()
count=0
result=''
for i in s:
    count+=1
    if count==k:
        S=i.lower()
        result+=S
    else:
        result+=i
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()
h = s[k-1].lower()
print(s[:k-1] + h + s[k:])

Solution (Python):



def main():
    N, K = list(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=input()
print(s[:k-1]+s[k-1].lower()+s[k:])

Solution (Python):
_,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())
S = input()
[print(S[i].lower(), end='') if i == K-1 else print(S[i], end='') for i in range(len(S))]

Solution (Python):


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


N, K = LI()
S = input()


def main():
    ans = list(S)
    d = {
        "A": "a",
        "B": "b",
        "C": "c"
    }
    
    ans[K - 1] = d[S[K - 1]]
    print("".join(ans))


if __name__ == "__main__":
    main()

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

Solution (Python):
n, k = map(int, input().split())
s = str(input())
for i in range(n):
    if i + 1 == k:
        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):
n,k = map(int, input().split())
s = list(input())
s[k-1] = s[k-1].lower()
for i in range(n):
  print(s[i], end = "")

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

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

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

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

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


for i in range(len(S)):
  if i+1 == N[1]:
    print(str.lower(S[N[1]-1]),end="")
  else:
  	print(S[i],end="")

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

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
import numpy as np
INF = float("inf")











N,k = map(int,input().split())
S = list(input())[:-1]
s = S[k-1]
if s == "A":
    S[k-1] = "a"
if s == "B":
    S[k-1] = "b"
if s == "C":
    S[k-1] = "c"
print("".join(S))

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

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

Solution (Python):
n, k = map(int, input().split())
s = list(input())
k -= 1
if s[k] == 'A':
  s[k] = 'a'
elif s[k] == 'B':
  s[k] = 'b'
else:
  s[k] = 'c'
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().split())
S = str(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=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()
s  = list(S)
s[k-1] = str.lower(s[k-1])
print(''.join(s))

Solution (Python):

import sys
try:
    from typing import List
except ImportError:
    pass


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


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    S = next(tokens)  
    solve(N, K, S)


if __name__ == '__main__':
    main()

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

result = ""

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

print(result)

Solution (Python):
n,k=[int(x) for x in input().rstrip().split()]
S=[i for i in 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 = input()

ans = ""

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

print(ans)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
  N, M = map(int, input().strip().split())
  S = input().strip()
  
  print(S[:M-1] + S[M-1].lower() + S[M:])


if __name__ == '__main__':
  main()

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




input_list = lambda : list(map(int,input().split()))

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

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

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

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

Solution (Python):
n,k=map(int,input().split())
s=list(input())
s[k-1] = chr(ord(s[k-1])-ord("A")+ord("a"))
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(map(str,S)))

Solution (Python):

import sys
input = sys.stdin.readline
N,K = (int(x) for x in input().split())
S =input().strip()
S_small=S.lower()
ans =S[:K-1] +S_small[K-1] +S[K:]
print(ans)

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()
print(*s, sep='')

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

s[k-1] = chr(ord(s[k-1])+ord("a")-ord("A"))

print("".join(s))

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

s="ABCabc"
ans=[]
for i in range(len(S)):
    if i==k-1:
        ans.append(s[s.index(S[i])+3])
    else:
        ans.append(S[i])
print("".join(ans))

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