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

Submission status: Accepted

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

s=input()

if s[K-1]=="A":
    t="a"

elif s[K-1]=="B":
    t="b"

else:
    t="c"

print(s[:K-1]+t+s[K:])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
N, K = map(int, input().split())
# 文字列の入力
S = input()
# 出力
O = S[:K-1] + chr(ord(S[K-1]) + 32) + S[K:] 
print(O)

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 = (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:
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:])

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

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

Submission status: Accepted

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

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

B = S[C-1]

#print(B)

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

#print(B)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# スペース区切りの整数の入力
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="")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
i = int(input().split()[1]) - 1
s = input()
print("{}{}{}".format(s[:i], s[i].lower(), s[i+1:]))

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:

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

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint
# import statistics
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に変更する
    node[x] = y
def same(x,y): return bool(root(x) == root(y))
def root(x):
    if node[x] == 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:  # そもそもvとv2が辺でつながっていない
            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))

Submission status: Accepted

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

Submission status: Accepted

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

S = str(input())

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

print(S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#A問題
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))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys


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


# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
# b = list(map(lambda x: math.ceil(x/10)*10, a))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#N,K = 3,1
N, K = map(int, input().split())
S = input()
#S = "ABC"

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=[]#入力画面の二文字を別々の文字に格納
a=input().split(" ")
A=int(a[0])
B=int(a[1])-1

Y=input()#1行に沢山の数値(または文字)が並んでいる場合にリストに格納していく
X=[]
X=list(Y) #数値YをリストXに格納
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)

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

Submission status: Accepted

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

Submission status: Accepted

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

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()
ans=[]
for i in range(len(S)):
    if i==K-1:
        ans.append(S[i].lower())
    else:
        ans.append(S[i])
print(''.join(ans))

Submission status: Accepted

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

S[K-1] = S[K-1].lower()
print(*S, sep="")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

#!/usr/bin/env python
N,k = map(int,input().split())
s = input()
res = s[:k-1] + s[k-1].lower() + s[k:]
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
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)

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sl=list(s)

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

s="".join(sl)

print(s)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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 = "")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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 range(N):
	ans += S[i]
print(ans)

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

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

#a[0][m]=a[0][m-1].lower()
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])