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

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

Solution (Python):
import sys

from fractions import gcd





from itertools import accumulate














input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

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

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

Solution (Python):
import sys

from fractions import gcd





from itertools import accumulate














input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    S = next(tokens)  

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

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

Solution (Python):
import sys

from fractions import gcd





from itertools import accumulate














input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    S = next(tokens)  

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

Solution (Python):

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

s = input()
s = list(s)

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

ans = ""

for i in range(n):
  ans+=s[i];
 
print(ans)

Solution (Python):
m=input().split()
N=int(m[0])
K=int(m[1])
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"

SS=""
for i in range(N): 
  SS+=S[i]

print(SS)

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

Solution (Python):

















import math
import copy
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations
from bisect import bisect_left, bisect_right


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")





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

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

Solution (Python):
N,K=map(int,input().split())
S=str(input())
a=S[K-1].swapcase()
ans=''
for i in range(0,N):
    if(i==K-1):
        ans+=a
    else:
        ans+=S[i]
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"
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()

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

print(S)

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

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

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

Solution (Python):




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

if S[b - 1] == "A":
    S = S[:b - 1] + "a" + S[b:]
elif S[b - 1] == "B":
    S = S[:b - 1] + "b" + S[b:]
elif S[b - 1] == "C":
    S = S[:b - 1] + "c" + S[b:]
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())
S=list(input())
for i in range(n):
        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 = list(input())

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

print(''.join(S))

Solution (Python):
N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()
_S = S[0]
if len(S)>1:
    for v in range(1, N):
        _S += S[v]
    print(_S)
else :
    print(_S)

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

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

print(''.join(S))

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

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

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

print(''.join(st))

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

N=list(input())

N[b-1] = N[b-1].lower();

print("".join(N))

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

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

Solution (Python):
A,B = map(int,input().split())
ans = ""
S = input()
for i,s in enumerate(S):
    if i == B - 1:
        ans += s.lower()
    else:
        ans += s
print(ans)

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

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

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

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

S_list = list(S)

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

print("".join(S_list))

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

Solution (Python):
def get_s(w, e):
    s = w + 1
    if s == k:
        if e == "A":
            return "a"
        elif e == "B":
            return "b"
        else:
            return "c"
    else:
        return e


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

k = i[1]


a = list(input())


ab = 0

while ab < i[0]:

    a[ab] = get_s(ab, a[ab])
    ab += 1

p = ""


for d in range(i[0]):
    p += a[d]
 
print(p)

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

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

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

Solution (Python):
N, K = map(int, input().split())
S = input()
C = [c.lower() if i == K-1 else c for i, c in enumerate(S)]
print(''.join(C))

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

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

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"

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

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

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

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 = ""
for i in range(N):
    if i == K - 1:
        if S[i] == "A":
            s += "a"

        elif S[i] == "B":
            s += "b"

        else:
            s += "c"

    else:
        s += S[i]

print(s)

Solution (Python):
length_and_index = list(map(int,input().split(' ')))
input_str = list(input()[:length_and_index[0]])
input_str[length_and_index[1]-1] = chr(ord(input_str[length_and_index[1]-1])+32)
out = "".join(str(x) for x in input_str)
print(out)

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

Solution (Python):
def solve(n, k, s):
    s = list(s)
    s[k-1] = s[k-1].lower()
    return "".join(s)

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

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())
li=list(input())
li[B-1]=li[B-1].lower()
for i in li:
    print(i,end="")

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

ans = ''.join(s)

print(ans)

Solution (Python):
_len, _pos = map(str, input().split(' '))
literal = input()
new_letter = []
for count, fig in enumerate(literal):
    if count == int( _pos) -1: new_letter.append(fig.lower())
    else: new_letter.append(fig)

print(''.join(new_letter))

Solution (Python):
n, k = input().split()
s = input()
print(''.join([j.lower() if i == int(k)-1 else j for i,j 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 = input().split()
s = input()
result = ''.join([j.lower() if i == int(k)-1 else j for i,j in enumerate(s)])
print(result)

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):
str = input().split()
N = int(str[0])
K = int(str[1])-1
S = list(input())

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

s = ""
for i in range(N):
    s = s + S[i]
    
print(s)

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

index = a[1] - 1
temp= s[index].lower()
s_list[index] = temp
s = "".join(s_list)
print(s)

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

Solution (Python):
N,K=map(int,input().split())
S = input()
list = [b.lower() if a+1==K else b for (a,b) in enumerate(S)]
moji = ''.join(list)
print(moji)

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

ans = "".join(l)
print(ans)

Solution (Python):

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

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):
N, K = [int(_) for _ in input().split()]
S = input()

cs = list(S)
cs[K - 1] = cs[K - 1].lower()
result = "".join(cs)

print(result)

Solution (Python):
import sys
import collections

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

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

mojiretu=''
for x in chars:
    mojiretu += x
print(mojiretu)

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

print(a)

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

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

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

print(t)

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

print(s)

Solution (Python):
N,K=map(int,input().split())
S=str(input())
def change(A):
  if S[A]=="A":
    sub="a"
  elif S[A]=="B":
    sub="b"
  else:
    sub="c"
  return sub

if K==1:
  print(change(0)+S[1:])
elif K==N:
  print(S[:N-1]+change(K-1))
else:
  print(S[:K-1]+change(K-1)+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, m = map(int,input().split())
S = list(input())
S[m-1] = S[m-1].lower()
print("".join(S))

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

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

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

print(word[:inputNum[1]- 1] + word[inputNum[1] - 1].lower() + word[inputNum[1]:] )

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

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

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

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

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):
m = [int(i) for i in input().split(" ")]
string = input()
ans = ""

for n in range(m[0]):
    if n == m[1]-1:
        ans += string[n].lower()
    else:
        ans += string[n]

print(ans)

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

Solution (Python):


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

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

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"

print("".join(s))

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

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

for i,j in enumerate(S):
	if i+1 == int(K):
		S[i] = j.lower()
print("".join(S))

Solution (Python):
N, K = [int(x) for x in input().split(' ')]
S = input()
print("".join([c if i!=K-1 else c.lower() for i, c in enumerate(S)]))

Solution (Python):
if __name__ == '__main__':
    a = input().split()
    n = int(a[0])
    k = int(a[1])
    s = input()
    s = s[0:k-1]+s[k-1].lower()+s[k:n]
    print(s)

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

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

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

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

print(''.join(S))

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

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

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

Solution (Python):
import sys

n=input()
num = n.split()
a=int(num[0])
b=int(num[1])

word = input()

res = word[0:b-1] + word[b-1].lower() + word[b:]

print(res)

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

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

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

Solution (Python):
list1=input().split(" ")
num1=int(list1[0])
num2=int(list1[1])
list2=input()
strings=""
for i in range(num1):
	if i==num2-1:
		strings+=list2[i].lower()    
	else:
		strings+=list2[i]
print(strings)

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

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

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

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

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

Solution (Python):
def main():
	'''
	メイン関数
	'''
	
	N, K = map(int, input().split())

	
	S = input()

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



if __name__ == '__main__':
	main()

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

str =input()

if str[K-1]=='A':
    out = str[0:K-1] + 'a' + str[K : N]
if str[K-1]=='B':
    out = str[0:K-1] + 'b' + str[K : N]
if str[K-1]=='C':
    out =str[0:K-1] + 'c' + str[K : N]

print(out)

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

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

    newStr = "{}{}{}".format(S[:K-1],S[K-1].lower() , S[K+1-1:])
    print(newStr)

main()

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

char = S[K-1]

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

Solution (Python):
from sys import stdin

n, k = map(int, stdin.readline().split())
lst = list(stdin.readline().strip())
lst[k-1] = lst[k-1].lower()

print(''.join(lst))

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

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

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

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

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

if s[k] == 'A':
    reply = 'a'
elif s[k] == 'B':
    reply = 'b'
elif s[k] == 'C':
    reply = 'c'

print(s[:k] + reply + 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, raw_input().split())
s = raw_input()

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

print "".join(s_list)

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

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

Solution (Python):
N,K = map(int, input().split())
S = input()
dir = {'A':'a', 'B':'b', 'C':'c'}

print(S[0:K-1] + dir[S[K-1]]+ 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_changed = "".join(S_list)

print(S_changed)

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

    res = ''
    for i, c in enumerate(S):
        res += c.lower() if i + 1 == k else c

    print(res)


if __name__ == '__main__':
    main()

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

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

print(newS)

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

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

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

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

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

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


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

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

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

print("".join([s[:k - 1], w, 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):


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

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

print("".join(S))

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

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

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

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

print(n[:k-1]+a+n[k:])

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

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()
for i in range(n):
  if i==k-1:
  	print(s[i].lower(),end="")
  else:
  	print(s[i],end="")

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

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

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

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





s_list = list(s)

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

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

ans = ""

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

print(ans)

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

s = list(map)


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

s.pop(k-1)
s.insert(k-1,x)

print("".join(s))

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

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):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v

def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False



dp = None


def main():
    N, K = li_input()
    S = input()

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

main()

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

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

a[m-1] = a[m-1].replace("A","a").replace("B","b").replace("C","c")
print("".join(a))

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

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

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

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

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

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

Solution (Python):


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

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

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

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

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

intn = int(n)
intk = int(k)

small = str.swapcase(s[intk -1])

answer = s[:intk-1] + small + s[intk:]

print(answer)

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

ret = ""

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

print(ret)

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

chars = list(s)
chars[int(k)-1]=chars[int(k)-1].lower()
correct = "".join(chars)
print(correct)

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

N = int(n)
K = int(k)

for i in range(0, N):
    if(i == (K-1)):
        print(s[i].lower(), end="")
    elif(i == (N-1)):
        print(s[i])
    else:
        print(s[i], end="")

Solution (Python):

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

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

print(s)

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

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

chars[a]=chars[a].lower()
correct = "".join(chars)
print(correct)

Solution (Python):
wordLength,changePlace=input().split(" ")               
wordLength = int(wordLength)                            
changePlace = int(changePlace)                          
words = input()                                         


words = list(words)                                     
words[changePlace - 1] = words[changePlace - 1].lower() 
correct = "".join(words)                                
print(correct)

Solution (Python):

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

print(''.join([c.lower() if i+1==K else c for i, c in enumerate(S)]))

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

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

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

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

Solution (Python):
a=""
N,K=map(int,input().split())
S=input()
l=[]
for i,x in enumerate (S):
    if i==K-1:
        x=x.lower()
    l.append(x)
for i in range(N):
    a+=l[i]
print (a)