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-----
3 1
ABC

-----Sample Output-----
aBC


Difficulty: introductory

Starter code:

Solutions:
N, K = map(int, input().split())
S = input()
print("".join(c.lower() if i == K else c for i, c in enumerate(S, 1)))

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

N, K = map(int, input().split())
S = list(input())
S[K - 1] = S[K - 1].lower()

print("".join(S))

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

# (K-1)文字目まで + K文字目 + K+1文字目から
print(S[:K-1] + S[K-1].lower() + S[K:])

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

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

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)

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

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

capital = ['A','B','C']
small = ['a','b','c']

i = capital.index(S[K-1])
ans = S[:K-1]+small[i]+S[K:]
print(ans)


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


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

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


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

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

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

def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    n, k = Input()
    s = input()
    print("".join(ch.lower() if index==k else ch for index, ch in enumerate(s, 1)))


main()

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"
a=""
for i in range(n):
    a+=s[i]
print(a)

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

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


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

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

S[K-1] = S[K-1].lower()
ans = ''
for s in S:
    ans += s
print(ans)

n,k = [int(x) for x in 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))

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

S_1 = S[0]
for i in range(1,N):
  S_1 = S_1 + S[i]
print(S_1)


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

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

print(ans)

n, k = map(int, input().split())
s = str(input())
ans = ''
if s[k-1] == 'A':
    ans = s[:k-1] + 'a' + s[k:]
    print(ans)
    return
elif s[k-1] == 'B':
    ans = s[:k-1] + 'b' + s[k:]
    print(ans)
    return
elif s[k-1] == 'C':
    ans = s[:k-1] + 'c' + s[k:]
    print(ans)
    return

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

# (K-1)文字目まで + K文字目 + K+1文字目から
print(S[:K-1] + rep + S[K:])

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

n, k = map(int,input().split())
s = input()
print(s[:k - 1], end = '')
print(str.swapcase(s[k - 1]), end = '')
print(s[k:])

N, K = map(int, input().split())
K -= 1
S = list(input())
for i, c in enumerate(S):
    if i == K:
        c = c.lower()
    print(c, end='')
print('')

N, K = map(int, input().split())
S = input()
ans = ''
for i in range(N):
    if i == K-1:
        if S[i] == 'A':
            ans += 'a'
        elif S[i] == 'B':
            ans += 'b'
        else:
            ans += 'c'
    else:
        ans += S[i]
print(ans)

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

N,K=map(int,input().split())
S=list(input())
S[K-1]=S[K-1].lower()

ans=""
for i in S:
  ans+=i
print(ans)

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


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

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'
for i in S:
  print(i,end="")

n, k = map(int, input().split())
list01 = list(input())
list01[k - 1] = str.lower(list01[k - 1])
a = ''.join(list01)
print(a)

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


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

n,k=map(int,input().split())
def replace(m):
  if m=="A":
    return "a"
  elif m=="B":
    return "b"
  else:
    return "c"
  
abc_str=list(input())
abc_str[k-1]=replace(abc_str[k-1])
abc_str="".join(abc_str)
print(abc_str)

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

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

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

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

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

tmp = s.pop(k - 1)
l = tmp.lower()
s.insert(k - 1, l)
print((''.join(s)))


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

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

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

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

print(S[:(K - 1)] + 'abc'[ord(S[K - 1]) - ord('A')] + S[K:])

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

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

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


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

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

print((''.join(S)))


# ABC126
# A Changing a Character
n, k = list(map(int, input().split()))
S = list(input())
x = S.pop(k-1).lower()
S.insert((k-1),x)
print(("".join(S)))


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

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

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

a,b=input().split()
a=int(a)
b=int(b)
c=input()
h,i,j=c[:(b-1)],c[b-1],c[(b):]
if i=="A":
  i="a"
if i=="B":
  i="b"
if i=="C":
  i="c"
print(h+i+j)

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

ss=s[k-1]
p=ss.lower()
#print(p)
s[k-1]=p
#print(s[k-1])
#print(s)

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

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

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

print("".join(S))

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

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

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

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


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

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

print("".join(T))

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

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

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

print("".join(S))

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


n,k=list(map(int,input().split(' ')))
s=input()
m=''
if s[k-1].isupper():
    m=s[k-1].lower()
else:
    m=s[k-1].upper()

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


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

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

N, K = map(int,input().split())
S = input()
ans = []
for i in range(N):
    if i == K - 1:
        x = ord(S[i])
        x += 32
        y = chr(x)
        ans.append(y)
    else:
        ans.append(S[i])

print(''.join(ans))

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

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

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

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


n, k = map(int,input().split())
s = input()
result_s = ''
a = 0

for s in list(s):
    a += 1
    if a==k:
        s = s.lower()
    result_s += s

print(result_s)

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

Omoji = ['A','B','C']
Kmoji = ['a','b','c']
n,k = map(int,input().split())
s = str(input())
ans = ''
for i in range(n):
    if i==(k-1):
        for j in range(len(Omoji)):
            if s[i]==Omoji[j]:
                ans += Kmoji[j]
    else:
        ans += s[i]
print(ans)

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

num = input().split()

N = int(num[0])
K = int(num[1])

S = input()

S2 = S[K-1]

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

print(S)

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


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

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

ABC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
abc = 'abcdefghijklmnopqrstuvwxyz'
print(s[:k-1] + abc[ABC.index(s[k-1])] + s[k:])

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

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

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

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

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

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

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

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

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


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

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

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

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

print(''.join(map(str,L)))

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

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


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

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

s = input()

L = []
for i in range(n):
    L.append(s[i])

L[k-1] = str.lower(L[k-1])
ans = str()
for i in range(n):
    ans += L[i]
print(ans)
    


N,K=map(int,input().split())
S=list(input())
for i in range(N):
    if i==K-1:
        S[i]=chr(ord(S[i])+32)
print(''.join(S))

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

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

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

print(ans)


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


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



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

s = list(input())
t = ''
for j,i in enumerate(s):
    if j == k-1:t += i.lower()
    else:t+=i
print(t)


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

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

def str_replace_to_lower() -> str:
    len_str, target_index = map(int, input().split())
    word = input()
    list_of_word = list(word)
    list_of_word[target_index - 1] = list_of_word[target_index - 1].lower()

    return ''.join(list_of_word)


print(str_replace_to_lower())