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



Sample input:
3 1
ABC


Sample output:
aBC

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 = "".join(S)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k = (int(x) for x in input().split())
s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input().split()

y = input()
y2 = y[int(x[1])-1]

if int(x[1]) == 1:
  word1 = y2.lower()
  word2 = y[1:]
  print(word1+word2)
elif int(x[1]) == int(x[0]):
  word1 = y2.lower()
  word2 = y[:(int(x[1])-1)]
  print(word2+word1)
else:
  word1 = y2.lower()
  word2 = y[:(int(x[1])-1)]
  word3 = y[(int(x[1])):]
  print(word2+word1+word3)

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    n, k = list(map(int, input().rstrip('\n').split()))
    s = str(input().rstrip('\n'))
    a = []
    for i in range(n):
        if i == k - 1:
            a.append(s[i].lower())
        else:
            a.append(s[i])
    print("".join(a))


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
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"
print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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"
answer = ''.join(s)
print(answer)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    n, k = map(int,  input().split())
    s = input()
    k = k - 1
    replaced = s[k]
    if replaced.isupper():
        replaced = replaced.lower()
    else:
        replaced = replaced.upper()

    result = s[:k] + replaced + s[k+1:]
    print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

#K番目の文字を小文字に変える
S[K-1] = S[K-1].lower()

#リストを文字列に変換する
answer = ''.join(S)

print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,K=[int(s) for s 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([str(n) for n in S]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

print "".join(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input()
a = []
for i in s:
    a.append(i)
a[k-1] = a[k-1].lower()
print(''.join(a))

Submission status: Accepted

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

S = input()

Sl = []

for i in range(len(S)):
  if i == K-1:
    Sl.append(S[i].lower())
  else:
    Sl.append(S[i]) 

print("".join(Sl))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(''.join(s))

Submission status: Accepted

Solution code:
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'

print(''.join(S))

Submission status: Accepted

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

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

Submission status: Accepted

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

if s[k-1] == 'A':
  mid = 'a'

if s[k-1] == 'B':
  mid = 'b'

if s[k-1] == 'C':
  mid = 'c'

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
c=input()
for i in range(len(c)):
  if b!=i+1:
  	print(c[i],end="")
  else:
    if c[i]=="A":
      print("a",end="")
    elif c[i]=="B":
      print("b",end="")
    else:
      print("c",end="")
print("")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s_replace = []
for i in range(0, n , 1):
  if i == k - 1:
    s_replace.append(s[i].lower())
  else:
    s_replace.append(s[i])
    
print(''.join(s_replace))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def to_lower(x):
  if x == "A":
    return "a"
  elif x == "B":
    return "b"
  else:
    return "c"

n, k = map(int, input().split())
line = input()
s = [i for i in line]
s[k-1] = to_lower(s[k-1])
print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = input()
T = ''
for i, ch in enumerate(S):
    if i == K-1:
        ch2 = ch.lower()
        T += ch2
    else:
        T += ch
print(T)

Submission status: Accepted

Solution code:
#16:31
n,k = map(int,input().split())
k -= 1
s = input()
#print(ord('a'),ord('A'),chr(97))
s = s[:k] + chr(ord(s[k]) + 32) + s[k+1:]
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:])

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = input()
print("".join([s if i != K else s.lower() for i,s in enumerate(list(S), 1)]))

Submission status: Accepted

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

s = input()

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=sys.stdin.readline
def resolve():
    n,k=map(int,input().split())
    s=input()
    print(s[:k-1]+s[k-1].lower()+s[k:])

resolve()

Submission status: Accepted

Solution code:
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'
elif S[K] =='C':
    S[K] = 'c'

ans = ''
for i in range(N):
    ans += S[i]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
M,N = [int(x) for x in input().split()]
s = input()

res =[]
for i,c in enumerate(s):
    if i+1==N:
        res.append(c.lower())
    else:
        res.append(c)
print("".join(res))

Submission status: Accepted

Solution code:
def main(): 

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

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

    print(s)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = [c.lower() if i==k-1 else c for i, c in enumerate(input())]
print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
c=list(input())
k=b-1
l=[]
for i in range(a):
	if i==k:
		print((c[i].lower()), end='')
	else:
		print((c[i]), end='')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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="")

Submission status: Accepted

Solution code:
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="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = list(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='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import accumulate
import sys
from heapq import heappush, heappop

def main():
    input = sys.stdin.readline
    N, K = map(int, input().split())
    S = list(input())
    S[K-1] = S[K-1].lower()
    print("".join(S))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
b=b-1
s=input()
l=len(s)
s2=[]
for i in range(l):
    if(i == b):
        s2.append(s[b].lower())
    else:
        s2.append(s[i])
for j in range(l):
    print(s2[j], end ='')
print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
s = input()
S = []
for i in range(n):
  S.append(s[i])
S[k-1] = S[k-1].lower()
print(*S,sep='')

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
s=input()
def change(s,k):
  print(s[:k-1],end="")
  if s[k-1]=="A":
      #s[k-1]='a'
      print("a",end="")
  elif s[k-1]=="B":
      #s[k-1]='b'
      print("b",end="")
  else:
      #s[k-1]='c'
      print("c",end="")
  print(s[k:])
change(s,k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
s = list(str(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"
print("".join(s))

Submission status: Accepted

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

S_list = [c for c in S]
#print(S_list)

if S_list[K-1] == 'A':
  S_list[K-1] = 'a'
elif S_list[K-1] == 'B':
  S_list[K-1] = 'b'
else:
  S_list[K-1] = 'c'

print(''.join(S_list))

Submission status: Accepted

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

s = S[K-1]

if s == 'A':
    S = S[:K-1] + 'a' + S[K:]
elif s == 'B':
    S = S[:K-1] + 'b' + S[K:]
else:
    S = S[:K-1] + 'c' + S[K:]

print(S)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s=list(input().split())
n=int(s[0])
k=int(s[1])
t=list(input())

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

tlast=''.join(t)
print(tlast)

Submission status: Accepted

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

l = []
for idx,i in enumerate(string):
    if idx == k -1:
        l.append(i.lower())
    else:
        l.append(i)

print(''.join(l))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools
# (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(N, K, S)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = ""
for i, j in enumerate(list(s)): 
  if i == k - 1:
    ans += j.lower()
  else:
    ans += j

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print("".join(s))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N, K = map(int, input().split())
    S = list(str(input()))
    s = S[K-1]
    S[K-1] = s.lower()
    print(''.join(S))

Submission status: Accepted

Solution code:
while True:
    try:
        N, K = map(int, input().split())
        S = list(input())
        S[K-1] = S[K-1].lower()
        print(''.join(S))
    except:
        break

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
import sys

def main():
    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="")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, K: int, S: str):
    Slist = list(S)
    Slist[K-1] = Slist[K-1].lower()
    
    S = ''.join(Slist)
    print(S)
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(N, K, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
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= "")

Submission status: Accepted

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

Submission status: Accepted

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

ans = ""
for i, j in enumerate(list(s)): 
  if i == k - 1:
    ans += j.lower()
  else:
    ans += j

print(ans)

Submission status: Accepted

Solution code:
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"
elif s[k]=="C":
  s[k]="c"

print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input()
answer = []

for i, c in enumerate(s, 1):
    if i == k:
        answer.append(c.lower())
    else:
        answer.append(c)
print("".join(answer))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    print(ans)


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

output =""
for i,char in enumerate(S):
    if i+1==K:
        output+=char.lower()
    else:
        output+=char
print(output)

Submission status: Accepted

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

sl = list(s)
sl[k-1] = sl[k-1].lower()
print("".join(sl))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if K == 1:
    print(lower_str + S[K:])
elif 1 < K < N-1:
    print(S[:K-1] + lower_str + S[K:])
elif (K > 1) and (K == N-1):
    print(S[:K-1] + lower_str + S[K])
elif K == N:
    print(S[:K-1] + lower_str)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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(str(ans) for ans in s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print (S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_, K = map(int, input().split())
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def func():
    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)


if __name__ == '__main__':
    func()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=list(map(int,input().split()))
S=list(input())
k=N[1]
S[k-1]=S[k-1].lower()
j = ' '
 
for x in S:
    j += x
print(j)

Submission status: Accepted

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

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

print("".join(s_lis))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

S_list = list(S)

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

print("".join(S_list))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC126 A
N,K = list(map(int,input().split()))
S = input()
if K == 1:
    print(S[0:1].lower() + S[K:])
elif K == N:
    print(S[:K-1] + S[K-1:K].lower())
else:
    print(S[:K-1] + S[K-1:K].lower() + S[K:])

Submission status: Accepted

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

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

if k == 1:
    print(x+s[k:n])
else:
    print(s[:k-1]+x+s[k:n])

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n,k = map(int,input().split())
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A = list(map(int,input().split()))
S=[i for i in input()]    
S[A[1]-1] = S[A[1]-1].lower()
print(*S,sep='')