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:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    n, k = LI()
    s = S()
    s[k-1] = s[k-1].lower()
    print("".join(s))

    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

Solution code:
a = input().split()
N, K = int(a[0]), int(a[1])
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:
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 = [ 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()
s = list(S)
s[K-1] = {'A':'a','B':'b','C':'c'}[s[K-1]]
print(''.join(s))

Submission status: Accepted

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

s=S
s=str.lower(s)

ans=''

for _ in range(N):
    if _==K-1:
        ans+=s[_]
    else:
        ans+=S[_]

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

Submission status: Accepted

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

    for i, c in enumerate(S, start=1):
        if i == K:
            print(str(c).lower(), end='')
        else:
            print(c, end='')
    else:
        print()


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

kotae = s[:k-1] + komoji(s[k-1]) + s[k:]
print(kotae)

Submission status: Accepted

Solution code:
N, K = map(int, input().rstrip().split())
S = input().rstrip()
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:
a,b = map(int,input().split())
c = input()
k = c[:b-1]+c[b-1].lower()
if a is not b:
  	k += c[b:]
print(k)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = input()
print(c[:b-1]+str.lower(c[b-1])+c[b:])

Submission status: Accepted

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

if k == 1:
  sTR = str[0] + STR[1:]
elif k == n:
  sTR = STR[:n-1] + str[n-1]
else:
  sTR = STR[:k-1] + str[k-1] + STR[k:]

print(sTR)

Submission status: Accepted

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

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

print(a)

Submission status: Accepted

Solution code:
# ABC126A - Changing a Character
n, k = list(map(int, input().rstrip().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())
x=s[k-1]
s.pop(k-1)
s.insert(k-1,(x.lower()))
print(''.join(s))

Submission status: Accepted

Solution code:
N, K = [int(nk) for nk in input().split()]
S = input()
T = []
for n in range(N):
  T.append(S[n])
if T[K-1] == "A":
  T[K-1] = "a"
elif T[K-1] == "B":
  T[K-1] = "b"
else:
  T[K-1] = "c"
U = "".join(T)
print(U)

Submission status: Accepted

Solution code:

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

def up():
    global K,S
    return S[:K-1] + S[K-1].lower() + S[K:]

print(up())

Submission status: Accepted

Solution code:
import sys

def change(S, N, K):
    K-=1
    print S[:K] + S[K].lower() + S[K+1:]

if __name__ == '__main__':
    input = sys.stdin.read()
    inlst = input.split("\n")
    N, K =inlst[0].split()
    S = inlst[1]
    change(S, int(N), int(K))

Submission status: Accepted

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

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

k -= 1
l = [c if i != k else c.lower() for i, c in enumerate(s)]
t = ''.join(l)

print(t)

Submission status: Accepted

Solution code:
# A - Changing Character
N, K = input().split()
S = input()

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

Submission status: Accepted

Solution code:
def main():
    N, K = map(int, input().split())
    for i, s in enumerate(input()):
        if i == K - 1:
            s = s.lower()
        print(s, end='')


if __name__ == '__main__':
    main()

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

chrs[nums[1]-1] = chrs[nums[1]-1].lower()
for c in chrs:
    print(c, end="")

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:
print((lambda n,s: ''.join([chr(ord(s[i])+32)if i==n[1]-1 else s[i]for i in range(n[0])]))(list(map(int,input().split())),input()))

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:
'''input
4 3
CABA
'''

N, K = [int(x) for x in input().split()]

s = input()

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

print(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:
from sys import stdin

N, K = [int(x) for x in stdin.readline().rstrip().split()]
input_str = stdin.readline().rstrip()
if(K==1):
  str = input_str[0].lower()
else:
  str = input_str[0]
for i in range(1,N):
  if(i==K-1):
    str = str + input_str[i].lower()
  else:
    str = str + input_str[i]
print(str)

Submission status: Accepted

Solution code:
k,s=open(0);k=int(k[2:]);print(s[:k-1]+s[k-1].lower()+s[k:])

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

l=list(s)
l[k-1]=l[k-1].lower()
print(''.join(l[:n]))

Submission status: Accepted

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

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

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:
a,s=map(int,input().split())
k=input()
lk=list(k)
l=lk[s-1]
lk[s-1]=l.lower()
print("".join(lk))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
#以下てんぷら
def j(q):
    if q==1: print("Yes")
    elif q == 0:print("No")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


#n = ip()                                     #入力整数1つ
x,y= (int(i) for i in input().split())       #入力整数横2つ以上
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(n)]    #入力セット(整数改行あり)(2/2)
#a=[input() for i in range(n)]    #入力セット(整数改行あり)(2/2)
#jの変数はしようできないので注意
#全足しに4 3sum変数使用はsum関数使用できないので注意
for i in range(x):
    if i == y-1:
        print(a[i].lower(),end='')
    else:
        print(a[i],end='')

Submission status: Accepted

Solution code:
a,b=[int(i) for i in input().split()]
c=list(input())

c[b-1] = str.lower(c[b-1])

c = ''.join(c)

print(c)

Submission status: Accepted

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

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

Submission status: Accepted

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

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 = list(input())
K -= 1
S[K] = chr(ord(S[K]) + 32)
print("".join(S))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

for n in range(N):
    print(s_up[n], end='')

print()

Submission status: Accepted

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

s = ''

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

print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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())
k -= 1
s = input()
c = s[k]
s = s[:k] + chr(ord(c) - ord('A') + ord('a')) + s[k + 1:]
print(s)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n, k = map(int, input().split())
s = input()

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

Submission status: Accepted

Solution code:
import sys
n = list(map(int, input().split()))
s = list(input())
for i in range(len(s)):
    if i == n[1]-1:
        print(s[i].lower(),end='')
        continue
    print(s[i],end='')

Submission status: Accepted

Solution code:
from sys import stdin
input1 = stdin.readline().rstrip().split()
inputStr = stdin.readline().rstrip()
inputLength = int(input1[0])
changeIdx = int(input1[1]) - 1
    
if inputLength > 50 or changeIdx > inputLength or len(inputStr) != inputLength:
    print("Invalid Input Error")
    
# K番目の文字が大文字なら小文字に、小文字なら大文字に変換する
if inputStr[changeIdx] == 'A' or inputStr[changeIdx] == 'B' or inputStr[changeIdx] == 'C' :
    print(inputStr[0 : changeIdx] + inputStr[changeIdx].lower() + inputStr[changeIdx + 1 : len(inputStr)])
else:
    print(inputStr[0 : changeIdx] + inputStr[changeIdx].upper() + inputStr[changeIdx + 1 : len(inputStr)])

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:
n, k = map(int, input().split())
accept = input()
list = []
for i in range(n):
    list.append(accept[i])
if list[k-1] == "A":
    list[k-1] = "a"
elif list[k-1] == "B":
    list[k-1] = "b"
elif list[k-1] == "C":
    list[k-1] = "c"
    
ans = list[0]
for j in range(n-1):
    ans += list[j+1]
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

S_new = ''.join(S)
print(S_new)

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=input().split(" ")
S=input().rstrip()
C=""
for i in range(len(S)):
  if i==int(N[1])-1:
    C += S[i].lower()
  else:
    C += S[i]
print(C)

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,m=map(int,input().split())
s=input()
s=s[:m-1]+chr(ord(s[m-1])-ord('A')+ord('a'))+s[m:]
print(s)

Submission status: Accepted

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

# スペース区切りの整数の入力
n, k = map(int, input().split())
# 文字列のlist化
s = list(input())

#対象箇所
a = s[k-1:k]
#文字列変換
a = ','.join(a)
#対象箇所を小文字に変換
a = a.lower()
#置換
s[k-1:k] = a

s = ''.join(s)
#print(s)
print("{}".format(s))

Submission status: Accepted

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

a=K-1
p=N
c=B[a]

t=c.lower()
B[a]=t

for i in range(p):
    print(B[i],end="")

Submission status: Accepted

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

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

if len(S) != N:
    print("error")

Ans = []
for i in range(N):
    if i == K-1:
        Ans.append(S[i].lower())
    else:
        Ans.append(S[i])
Ans_str = "".join(Ans)
print(Ans_str)

Submission status: Accepted

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

S_list = [S[:K-1], S[K - 1], S[K:]]

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

print(''.join(S_list))

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:
input1 = input()
input2 = input()

input1_splited = input1.split(" ")
n = input1_splited[0]
k = input1_splited[1]
s = input2
k = int(k) - 1
list = list(input2)
tochange = list[int(k)]
changed = tochange.lower()
list[k] = changed
result_str = "".join(list)
print(result_str)

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:
b, c = map(int, input().split())
s = input()
print(s[0:c-1]+s[c-1].lower()+s[c:b])

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:]
elif S[K-1] == "C":
  S = S[:K-1] + "c" + S[K:]


print(S)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
N, K = map(int, input().split())
S = input()

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

Submission status: Accepted

Solution code:
nums = input()
charas = input()
 
num = nums.split()
 
temp = int(num[1]) - 1
 
chara_1 = charas[ : temp]

chara_2 = charas[temp + 1 : ]
 
new_chara = charas[temp].lower()
 
print(chara_1 + new_chara + chara_2)

Submission status: Accepted

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

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

Submission status: Accepted

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

s=list(s)

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

s="".join(s)

print s

Submission status: Accepted

Solution code:
data = input().split()
k = int(data[1])
st = input()
s = st[k-1].lower()
st = list(st)

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

Submission status: Accepted

Solution code:
nk_str = input()
string = input()
nk_list = nk_str.split()
k = int(nk_list[-1])
string_list = [c for c in string]
string_list[k - 1] = string_list[k - 1].lower()
string = ''.join(string_list)
print(string)

Submission status: Accepted

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

Submission status: Accepted

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

S =str(input())


v = S[:K-1]
w = S[K-1:K]
x = S[K:]


y = w.swapcase()

Z =v + y + x


print(Z)

Submission status: Accepted

Solution code:
a=input().split()
s=input()
b=s.lower()
s=s.upper()
N=int(a[0])
K=int(a[1])
list=[]
n=0
while True:
    if n==K-1:
        list.append(b[n])
    else:
        list.append(s[n])
    n=n+1
    if n==N:
        break
list1="".join(list)
print(list1)

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest


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


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """3 1
ABC"""
        output = """aBC"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """4 3
CABA"""
        output = """CAbA"""
        self.assertIO(input, output)


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
s=list(input())
t=chr(ord(s[k-1])+32)
s[k-1]=t
print(''.join(s))

Submission status: Accepted

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

n_s = s[k-1].swapcase()

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

Submission status: Accepted

Solution code:
N, K = (int(i) for i in input().split())
S = input()

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

for aa in result:
  print(aa,end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import fractions

N,K = (input()).split(" ")
S = input()

N=int(N)
K=int(K)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=input().split()
s=input()
N=int(n)
K=int(k)
S=str(s)
P=(S[K-1])
Q=P.lower()
T=S[:K-1]+Q+S[K:]
print(T)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n,k=map(int , input().split())
string=list(input())
result=[]
for i in range(n):
  if i==k-1:
    result.append(chr(ord(string[i])+32))
  else:
    result.append(string[i])
print(''.join(result))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = list(str(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)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

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 = list(input().strip())
S[K-1] = S[K-1].lower()
print("".join(S))

Submission status: Accepted

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

d = c[b-1];
e = d.lower()

tmp = c[0:b-1]
tmp2 = c[b:len(c)]

print(tmp + e + tmp2)

Submission status: Accepted

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

items = []

for i, w in enumerate(S):
  items.append(w)
  if i == (K - 1): items[i] = w.lower()


ans = ''
for e in items: ans += e 

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=list(input())
s[k-1]=chr(ord(s[k-1])+32)
print(''.join(s))

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
S = input()
count = 1
for x in S:
    if count == K :
        print(x.lower(),end="")
        count += 1
        continue
    print(x,end="")
    count += 1
print()

Submission status: Accepted

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

Submission status: Accepted

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

index = K-1
s_char = S[index].lower()
# print(s_char)
S = list(S)
S[index] = s_char
print("".join(S))

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
S = input()
l = len(S)
chr = S[k-1].lower()

Answer = S[0:k-1]+chr + S[k:l]

print(Answer)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
def solve(lines):
    N,K = map(int, lines.pop(0).split(' '))
    S = lines.pop(0)
    print(S[:K-1] + S[K-1].lower() + S[K:])
#contents = '''\
#3 1
#CAB\
#'''
#lines = contents.split('\n')

# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Submission status: Accepted

Solution code:
N, K = [int(x) for x 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 = list(input())
S[K-1] = S[K-1].swapcase()
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())
s = input()

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

print(t)

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = list(input())
change = S[K-1]
S.pop(K-1)
change = change.lower()
if(K == N):
    S.append(change)
else:
    S.insert(K-1,change)
Snew = "".join(S)
print(Snew)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc126
# -*- coding: utf-8 -*-
 
n,k = map(int,input().split())
s = list(input())
s[k-1] = s[k-1].lower()
a = ""
for i in s:
        a+=i
print(a)

Submission status: Accepted

Solution code:
N, K = input().split()
N = int(N)
K = int(K)
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())
ans = S
ans[K-1] = ans[K-1].lower()
print(''.join(ans))

Submission status: Accepted

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

tar_str = input()

output_str = ''

for i in range(len(tar_str)):
    if i == input1[1] - 1:
        output_str += tar_str[i].lower()
    else:
        output_str += tar_str[i]

print(output_str)

Submission status: Accepted

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

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

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 += 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()
for i in range(N):
    print(S[i], end="")
print()

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns()) #int
na = lambda: list(map(int, stdin.readline().split())) #int,list
ns = lambda: stdin.readline().rstrip()  # str

n,k = na()
s=ns()
print(s[:k-1]+s[k-1].lower()+s[k:])

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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


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


# Generated by 1.1.4 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=list(map(int,input().split(" ")))
s=list(input())
s_str = ""
if s[k-1]=="A":
    s[k-1]="a"
elif s[k-1]=="B":
    s[k-1]="b"
else:
    s[k-1]="c"
for i in s:
    s_str += i
print(s_str)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

if moji[K-1]=="A":
    moji[K-1]="a"
if moji[K-1]=="B":
    moji[K-1]="b"
if moji[K-1]=="C":
    moji[K-1]="c"
    
exportmoji=""
for x in moji:
    exportmoji+=x
print(exportmoji)

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
# import math
# import random
# import fractions
# import sys
# sys.setrecursionlimit(100000)
# N = int(stdin.readline().rstrip().split()[0])
# A = [int(x) for x in stdin.readline().rstrip().split()]
# N, X = [int(x) for x in stdin.readline().rstrip().split()]
# S = stdin.readline().rstrip().split()[0]

N, K = [int(x) for x in stdin.readline().rstrip().split()]
S = list(stdin.readline().rstrip().split()[0])

ABC = list("ABC")
abc = list("abc")
idx = ABC.index(S[K-1])
S[K-1] = abc[idx]
print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math 
import numpy as np
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input()

N,K=na()
S=ns()
s=S[K-1]


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

print(ans)