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

t = S.lower()
answer = ''

for i in range(N):
  if i == K-1:
    answer = answer + t[i]
  else:
    answer = answer + S[i]

print(answer)

Solution (Python):


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

S = input()

O = S[:K-1] + chr(ord(S[K-1]) + 32) + S[K:] 
print(O)

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 = (int(i) for i 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()))

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

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

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

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()
st = ''.join(s)
print(st)

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

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

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

C = A[1]
D = A[0]
ans = ""

B = S[C-1]



if(B == "A"):
    B = "a"
elif(B == "B"):
    B = "b"
else:
    B = "c"



for i in range(D):
    if (i == C-1 ):
        ans = ans + B
        continue
    ans = (ans + S[i]) 

print(ans)

Solution (Python):
length, pos = input().split(' ')
length, pos = int(length), int(pos)
target = input()
answer = ''
if pos == 1:
  answer = str(target[pos-1].lower() + target[1:])
elif pos == length:
  answer = str(target[:-1] + target[pos-1].lower())
else:
  answer = str(target[:pos-1] + target[pos-1].lower() + target[pos:])

print(answer)

Solution (Python):

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

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

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

i = 0
for c in s:
    if i == k-1:
        print(c.lower(), end="")
    else:
        print(c, end="")
    i += 1

print()

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()
T = []
for i, s in enumerate(S, 1):
    if i == K:
        s = chr(ord(s) + 32)
    T.append(s)
print(''.join(T))

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

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

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

Solution (Python):


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

if S[K] == "A" :
  S[K] = "a"
elif S[K] == "B" :
  S[K] = "b"
else :
  S[K] = "c"
  
ans = "".join(S)
print(ans)

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

S = list(input())

T = [elem.lower() if idx == K-1 else elem for idx, elem in enumerate(S)]

print("".join(T))

Solution (Python):



inp = input().split()
N = int(inp[0])
K = int(inp[1])

S = input()

ch = S[K - 1]

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

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

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

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

if s[k-1].isupper():
    print(s[:k-1] + s[k-1].lower() + s[k:])
else:
    print(s[:k-1] + s[k-1].upper() + s[k:])

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

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

Solution (Python):
i = int(input().split()[1]) - 1
s = input()
print("{}{}{}".format(s[:i], s[i].lower(), s[i+1:]))

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

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

Solution (Python):

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

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

Solution (Python):
alpha1='abcdefghijklmnopqrstuvwxyz'
alpha2='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n,k = list(map(int,input().split(" ")))
s = list(input())

for i in range(26):
  if alpha2[i] == s[k-1]:
    t = i
    break
s[k-1]=alpha1[t]
for i in range(n):
  print(s[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):
def main():
    n, k = map(int, input().split())
    s = input()
    t = s[:k-1] + s[k-1].lower() + s[k:]
    print(t)

main()

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

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

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):
N, K = map(lambda x: int(x), 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()
s = s[:n]
k -= 1


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

Solution (Python):
n,k=[int(i) for i in input().strip().split(" ")]
s = input().strip()
r = ""
for i,c in enumerate(s):
    if i != k-1:
        r += c
        continue
    if c == "A":
        r += "a"
    elif c == "B":
        r += "b"
    elif c == "C":
        r += "c"

print(r)

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

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

S_true = input()

S = list(S_true)

if 'A' in S[K-1] :
    S[K-1] = S[K-1].lower()
elif 'B' in S[K-1]:
    S[K-1] = S[K-1].lower()
else : S[K-1] = S[K-1].lower()

S_ans = "".join(S)

print(S_ans)

Solution (Python):
n, k = map(int,input().split())
s = str(input())
if 1 < k < 3:
    front = s[0]
elif k == 1:
    front = ''
else:
    front = s[:k-1]
tmp = s[k-1]
rear = s[k:]


print(front+tmp.lower()+rear)

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

b=int(b)
X=A[b-1]

Z=list(A)
Z[b-1]=str.lower(X)
Y="".join(Z)
print(Y)

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

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

Solution (Python):
N, K = map(int, raw_input().split())
S = str(raw_input())
if K == 1:
    s_idx = 0
else:
    s_idx = K-1



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

Solution (Python):
from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint

import bisect
import copy
import fractions
import math
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers):
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))
def unite(x, y):
    
    x = root(x)
    y = root(y)
    if x == y:
        return
    
    node[x] = y
def same(x,y): return bool(root(x) == root(y))
def root(x):
    if node[x] == x:  
        return x
    else:
        node[x] = root(node[x])  
        return node[x]
def dfs(v):
    
    visited[v] = True
    for v2 in range(n):
        if graph[v][v2] == False:  
            continue
        if visited[v2] == True:  
            continue
        dfs(v2)

n , k = MI()
ans = []
s = IS()
for i, st in enumerate(s):
    if i+1 == k:
        ans.append(st.lower())
    else:
        ans.append(st)
print(''.join(ans))

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

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

S = str(input())

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

print(S)

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

print("")

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

S_small=S[K-1].lower()
S_list=list(S)
S_list[K-1]=S_small
S_ans="".join(S_list)
print(S_ans)

Solution (Python):

from collections import defaultdict

def get_renzokuomote(goal, now_num):
    count = 0
    while now_num < goal:
        now_num *= 2
        count += 1
    return count



def main():
    n, k = map(int, input().split())
    sss = list(input())
    sss[k - 1] = sss[k - 1].lower()
    print(''.join(sss))





if __name__ == '__main__':
    main()

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

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

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

s = input()
S =[]
for i in range(len(s)):
    S.append(s[i])

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'

ans = str()
for i in range(len(S)):
    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 = input().split()
S  =input()
answer = ""
for i in range(int(N)):
 if i == (int(K) - 1) :
  answer += S[i].swapcase()
 else:
  answer += S[i]
print(answer)

Solution (Python):

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

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

first = s[:k-1]
last = s[k:]

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

result = first + midle + last

print(result)

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

Solution (Python):
a=input().split()
a=list(map(int,a))
pos = a[1]-1
pal=input()
pal=list(pal)
pal[pos]=pal[pos].lower()
i=1
while i<a[0]:
  pal[0]=pal[0]+pal[i]
  i+=1
print (pal[0])

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

Solution (Python):

if __name__ == '__main__':
    n,k = list(map(int, input().split()))
    s = input()

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

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

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

if b>=2:
  print(c[0:b-1]+c[b-1].lower()+c[b:a])
else:
  print(c[0].lower()+c[1:a])

Solution (Python):



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

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

print("".join(ls))

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

Solution (Python):

def solve():
    N, K = map(int, input().split())
    S = input()
    res = S[:K-1] + S[K-1].lower() + S[K:]
    return str(res)

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

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

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

Solution (Python):
a = input()
aSplit = a.split(' ')
A = int(aSplit[0])
B = int(aSplit[1])
wordSize = A
removePosition = B
word= str(input())
reword=''
for i in range(wordSize):
    if(i==(removePosition-1)):
        if(word[removePosition-1]=="A"):
            reword+=(str("a"))
        elif(word[removePosition-1]=="B"):
             reword+=(str("b"))
        elif(word[removePosition-1]=="C"):
             reword+=(str("c"))
    else:
        reword+=(word[i])
        
print(reword)

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

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

Solution (Python):
N, K = [ int(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()

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()
list = []
for i in range(N):
    list.append(S[i])
if list[K-1] == "A":
    list[K-1] = "a"
if list[K-1] == "B":
    list[K-1] = "b"
if list[K-1] == "C":
    list[K-1] = "c"
S_ans = "".join(list)
print(S_ans)

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

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

Solution (Python):
def main():
    K = int(input().split()[1])
    S = input()

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

if __name__ == "__main__":
    main()

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

Solution (Python):
a = input().split()
b = input()
 
c = list(b)
 
for i in range(len(c)):
  if i == int(a[1]) - 1:
    c[i] = c[i].lower()
    
print(''.join(c))

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

x=s[b-1].lower()	
if b==0:
  print(x+s[b:a])
else:
  print(s[0:b-1]+x+s[b:a])

Solution (Python):
num=[]
num=[int(i) for i in input().split()]
mozi = input()
mozi_list = list(mozi)

mozi_list[num[1]-1] = mozi_list[num[1]-1].lower()

mozi_new = "".join(mozi_list)

print(mozi_new)

Solution (Python):

def main():
    answer = ''
    N,K = map(int,input().split())
    S = list(input())
    if S[K-1] == 'A':
        S[K-1] = 'a'
    elif S[K-1] == 'B':
        S[K-1] = 'b'
    elif S[K-1] == 'C':
        S[K-1] = 'c'
    for s in S:
        answer += s
    print(answer)

if __name__ == '__main__':
    main()

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

S[K - 1] = str(S[K - 1]).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], end ="")
    else:
        print(S[i].lower(), end="")
    if i== N-1:
        print()

Solution (Python):
import sys


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









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

Solution (Python):
N, K = map(int, input().split())
S = input()
d = {'A': 'a', 'B': 'b', 'C': 'c'}
ans = ''
for i, s in enumerate(S):
  if i + 1 == K:
    ans += d[s]
  else:
    ans += s
print(ans)

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

Solution (Python):
miu = input().split()
sella = input()

for x in range(0, int(miu[0])):
	if x == int(miu[1])-1:
		print(sella[x].lower(), end='')
	else:
		print(sella[x], end='')

Solution (Python):
nk = list(map(int, input().split()))
s = list(map(str, input().split()))

n = nk[0]
k = nk[1]
str_s = s[0]

tmp = str_s[k-1]

new_s = "XXX"

if(tmp == 'A'):
    new_s = str_s[:k-1] + 'a' + str_s[k:n]
elif(tmp == 'B'):
    new_s = str_s[:k-1] + 'b' + str_s[k:n]
elif(tmp == 'C'):
    new_s = str_s[:k-1] + 'c' + str_s[k:n]

print(new_s)

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


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

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

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

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

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

cnt = 0
S = ""
for c in s:
  if cnt == k-1:
    S = S + c.lower()
  else:
    S = S + c
  cnt = cnt + 1

print(S)

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

str_changed = "".join(s_list)

print(str_changed)

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

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

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

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()
def lower(S,K):
  a=S[K-1].lower()
  S=S[:K-1]+a+S[K:]
  return S
print("{}".format(lower(S,K)))

Solution (Python):
N, K = (int(i) for i in 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'

S = "".join(S)

print(S)

Solution (Python):
a=[]
a=input().split(" ")
A=int(a[0])
B=int(a[1])-1

Y=input()
X=[]
X=list(Y) 
if X[B]=='A':
    X[B]='a'
elif X[B]=='B':
    X[B]='b'
elif X[B]=='C':
    X[B]='c'

P=''.join(X)
print(P)

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

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

Solution (Python):
M,K=[int(i) for i in 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()
ans = ''

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

print(ans)

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

Solution (Python):
N, K = list(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())
s = input()

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

modified = s[:target] + cvt_char + s[target + 1:]

print(modified)

Solution (Python):
N, K = map(int, input().split())
S = list(input()[:N])
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()
answer=""
for x in S:
    answer+=x
print(answer)

Solution (Python):
a = input().split()
b = input()
k = int(a[1])
new = b[:k-1] + b[k-1].lower() +b[k:]
print(new)

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

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

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n,k = li()
s = ns()

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

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

lower_input = line_input.lower()
K -= 1
if K == 0:
	line_output = lower_input[K] + line_input[K+1:]
elif K == N-1:
    line_output = line_input[:K] + lower_input[K]
else:
    line_output = line_input[:K] + lower_input[K] + line_input[K+1:]

print(line_output)

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

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

Solution (Python):

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

Solution (Python):


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

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

Solution (Python):

import re
import bisect
from datetime import datetime as dt
n, k = map(int, raw_input().split())
s = raw_input()
ans = ""
for i, a in enumerate(s):
    if i == k - 1:
        ans += a.lower()
    else:
        ans += a

print(ans)

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

print(S)

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

if(S[K-1]=='A'):
  for i in range(N):
    if(i==K-1):
      print('a',end='')
    else:
      print(S[i], end='')
elif(S[K-1]=='B'):
  for i in range(N):
    if(i==K-1):
      print('b',end='')
    else:
      print(S[i],end='')
else:
  for i in range(N):
    if(i==K-1):
      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()
print(''.join(S))

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

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

Solution (Python):



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

str= input()

ans = ""

for i in range(a):
    if i == b-1:
        cha = str[i]
        c = cha.lower()
        ans += c
    else:
        ans += str[i]
print(ans)

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

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

Solution (Python):
import sys

array = []
for line in sys.stdin.readlines():
    array.append(line.rstrip().split())
    
N = int(array[0][0])
K = int(array[0][1])
S = array[1][0]

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

sl=list(s)

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

s="".join(sl)

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


A = list(map(int,input().split()))
N = A[0]
K = A[1]

  
s = list(input())

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

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

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

print(s_out)

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

s_list = list(S)

tmp = s_list[K-1]
s_list[K-1] = tmp.lower()

S = ''.join(s_list)

print(S)

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

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

Solution (Python):
a = input().split(" ")
N = a[0]
K = int(a[1]) - 1
b = list(str(input()))
b[K] = b[K].lower()
ans = ''.join(b)
print(ans)

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

ans=""

for i,j in enumerate(S):
    if i+1==K:
        j=j.lower()
       
  
    ans=ans+j
              
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):
import numpy as np
words = lambda t : list(map(t, input().split()))

n,k = words(int)
str = input()

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

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

Solution (Python):
N, K = map(int, input().split(" "))
S = input()
for i, s in enumerate(S, 1):
    if i == K:
        print(s.swapcase(), end="")
    else:
        print(s, end="")
    if i == N:
        print()

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

K -= 1

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

print(''.join(s))

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

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

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

a = list(map(str, input().split()))


c=a[0][m-1]
d=a[0][0:m-1]
e=a[0][m:n]

a[0]=d+c.lower()+e

print(a[0])

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N, K = read_ints()
S = list(read()[:-1])

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

print(*S, sep='')

Solution (Python):


"""
Created on Tue Feb 26 17:52:43 2019

@author: nakamuratakayuki
"""

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

S2 = list(S)
S2[K-1] = S2[K-1].lower()
S = ''.join(S2)
print(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_ans = "".join(S_list)
print(S_ans)

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

line_str = list(input())

line_str[K-1] = str.lower(line_str[K-1])

ans = ''.join(line_str)

print(ans)

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

Solution (Python):
N,K=map(int,input().split())
S=str(input())
S_before=S[0:K-1]
S_after=S[K:]
S_just=S[K-1].lower()

S=S_before+S_just+S_after
print(S)

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

print(s[0:k - 1] ,end = '')
print(s[k - 1].lower() ,end = '')
print(s[k:n])

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

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

Solution (Python):
import sys

lines = sys.stdin.readlines()
pointer = int((lines[0].rstrip()).split()[1]) - 1
string_list = list(lines[1].rstrip())
string_list[pointer] = string_list[pointer].lower()
output = "".join(string_list)
print(output)

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

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

S_str = "".join(S)

print(S_str)

Solution (Python):
n, k = input().split()
s = input()
k_n = int(k) -1
p = [d.lower() if i == k_n else d for i, d in enumerate(s)]
print("".join(p))

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

new_s = []
for i, char in enumerate(s):
	if i == k-1:
		new_s.append(s[i].lower())
	else:
		new_s.append(s[i])

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

Solution (Python):
import copy

class Solver:
    def __init__(self, _n, _k, _s):
        self.n = _n
        self.k = _k
        self.upper = copy.deepcopy(_s)
        self.lower = _s.lower()

        self.solve()
    
    def solve(self):
        ans = ""
        for i in range(self.n):
            if i == self.k - 1:
                ans = ans + self.lower[i]
            else:
                ans = ans + self.upper[i]
        
        print(ans)

def main():
    n, k = (int(i) for i in input().split())
    s=input()
    Solver(n, k, s)



if __name__ == "__main__":
    main()

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

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

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

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

temp = s[k-1].lower()
if k-1 != len(s):
    ans = s[0:k-1] + temp + s[k:]
else:
    ans = k[0:k-1] + temp
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"
S="".join(S)
print(S)

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

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