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:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


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


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


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


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


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

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

    return ret


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

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

print(*S, sep='')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 26 17:52:43 2019

@author: nakamuratakayuki
"""

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

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

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

Submission status: Accepted

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

line_str = list(input())

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

ans = ''.join(line_str)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

S=S_before+S_just+S_after
print(S)

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
import sys

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

Submission status: Accepted

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

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

S_str = "".join(S)

print(S_str)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import copy

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

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

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



if __name__ == "__main__":
    main()

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"
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:K].swapcase()+S[K:])

Submission status: Accepted

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

temp = s[k-1].lower()
if k-1 != len(s):
    ans = s[0:k-1] + temp + s[k:]
else:
    ans = k[0:k-1] + temp
print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
s = input()
l = list(s)
ans = ""
for i,x in enumerate(l):
  if i == k-1:
    x = x.lower()
  ans += x
print(ans)

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
S=input()
s=str()
for i in range(N):
	if not i==K-1:
		s+=S[i]
	else:
		if S[K-1]=='A': s+='a'
		if S[K-1]=='B': s+='b'
		if S[K-1]=='C': s+='c'
print(s)

Submission status: Accepted

Solution code:
i = list(map(int, input().split()))
n = i[0]
k = i[1]
str = input()
hoge = ""

for m in range(n):
  if m == k-1:
    hoge = hoge + str[m].lower()
  else:
    hoge = hoge + str[m]
  
print(hoge)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(new)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N, K = input().split()

S = list(input())


K = int(K)

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

print("".join(S))

Submission status: Accepted

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

for i in range(n):
	if (i == k - 1):
		s2 += s1[i].lower()
	else:
		s2 += s1[i]

print(s2)

Submission status: Accepted

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

Submission status: Accepted

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

s[K-1] = s[K-1].lower()
for num in range(l):
    S = S + s[num]

print(S)

Submission status: Accepted

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

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

Submission status: Accepted

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

S = list(input())

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

S[K-1] = a
#print (S)
for i in range(N):
    print (S[i], end='')
print ()

Submission status: Accepted

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

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

print("".join(c))

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    # スペース区切りの整数の入力
    N, K = map(int, input().split())
    s = input()

    # s = aaa[0:N]
    s_list = list(s)

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

    ans_str = ""
    for a in s_list:
        ans_str += a
    print(ans_str)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ls = input().split()
s = list(input())
 
n = int(ls[0])
k = int(ls[1]) - 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()

sk = s[K - 1]

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

print("")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
input_int = lambda:int(input())
input_ints = lambda:map(int,input().split())
input_ints_list = lambda:list(input_ints())
input_str = lambda:input()
input_strs = lambda:input().split()
input_lines = lambda n,input_func:[input_func() for _ in range(n)]

import importlib
import_module = lambda module_name:importlib.import_module(module_name)

init_array_1dim = lambda value,n:[value]*n # 1次元配列を生成
init_array_2dim = lambda value,n,m:[init_array_1dim(value,n) for _ in range(m)] # 2次元配列を生成

gcd_base = lambda value1,value2:import_module('fractions').gcd(value1,value2) # 最大公約数（2値)
gcd = lambda lst:import_module('functools').reduce(gcd_base,lst) # 最大公約数（リスト）
lcm_base = lambda value1,value2:(value1*value2)//gcd_base(value1,value2) # 最小公倍数(2値)
lcm = lambda lst:import_module('functools').reduce(lcm_base,lst,1) # 最小公倍数(リスト)

permutations = lambda lst,n:import_module('itertools').permutations(lst,n) # 順列
combinations = lambda lst,n:import_module('itertools').combinations(lst,n) # 組み合わせ
product = lambda lst1,lst2:import_module('itertools').product(lst1,lst2) # 二つのリストの直積

round = lambda value:round(value) # 四捨五入
ceil = lambda value:import_module('math').ceil(value) # 切り上げ
floor = lambda value:import_module('math').floor(value) # 切り捨て

# キュー
init_q = lambda lst: import_module('collections').deque(lst)
q_pop = lambda q: q.popleft() # 先頭から取り出し
q_push = lambda q,value:q.appendleft(value) # 先頭に追加（値）
q_pushlist = lambda q,lst:q.extendleft(lst) # 先頭に追加（リスト）
q_append = lambda q,value:q.append(value) # 末尾に追加（値）
q_appendlist = lambda q,lst:q.extend(lst) # 末尾に追加（リスト）

# プライオリティキュー
init_heap = lambda a:import_module('heapq').heapify(a)
heap_push = lambda a,v:import_module('heapq').heappush(a,v)
heap_pop = lambda a:import_module('heapq').heappop(a) # 最小値を取り出す

def solution():
    # ここに実装
    N,K = input_ints()
    S = input_str()
    S = list(S)
    S[K-1] = S[K-1].lower()
    print(str.join("", S))
        
if __name__ == '__main__':
    solution()

Submission status: Accepted

Solution code:
length, k = map(int, input().split())
abc = str(input())

result = ""
for n in range(length):
    c = abc[n]
    result += c if n + 1 != k else c.lower()
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

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

print("{}".format(S_new))

Submission status: Accepted

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

ans = ""
cou = 0

for i in S:
    if cou + 1 == K:
      if S[cou] == "A":
        i = "a"
      elif S[cou] == "B":
        i = "b"
      else:
        i = "c"
    ans += i
    cou += 1
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())
s = input()

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

Submission status: Accepted

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

new_s = list()
for i in range(len(S)):
    if i == K:
        new_s.append(S[i].lower())
    else:
        new_s.append(S[i])

print(''.join(new_s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
S=input()
S2=S.swapcase()
S3=[]

for i in range(N):
    if i == K-1:
      S3.append(S2[i])
    else:
      S3.append(S[i])

print (''.join(S3))

Submission status: Accepted

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

print(S)

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(n, k, S):
    return S[:k-1]+S[k-1].lower()+S[k:]


do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    n, k = list(map(int, input().split()))
    S = input().split()
    print(sol(n, k, S[0]))

    # S = input().strip()
    # print(sol(S))

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
c=list(input())
henka = c.pop(b-1)
if henka=="A":
    c.insert(b-1,"a")
elif henka=="B":
    c.insert(b-1,"b")
else:
    c.insert(b-1,"c")
print(''.join(c))

Submission status: Accepted

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

Submission status: Accepted

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

ls = []

for n in range(N):
	ls.append(S[n])

result = ""

for n in range(N):
	if n != K-1:
		result += ls[n]
	else:
		if S[K-1] == "A":
			result += "a"
		if S[K-1] == "B":
			result += "b"
		if S[K-1] == "C":
			result += "c"

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

S = input()

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

str = list(S)

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

str_change = "".join(str)

print(str_change)

Submission status: Accepted

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

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

for s in S:
  print(s, end ="")

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:
#ABC126A-ChangingACharacter.py

from sys import stdin

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

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

print(newS)

Submission status: Accepted

Solution code:
# coding: utf-8


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

input_line = input().split(" ")
a = int(input_line[1])
b = int(input_line[0])
str = input()

dtr = str[a-1:a].translate(str.maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'))

ans = str[:a-1] + dtr + str[a:]
print(ans)

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
str = input()
str_list = list(str)
str_list[K-1] = chr(ord(str_list[K-1])+32)
str="".join(str_list)
print(str)

Submission status: Accepted

Solution code:
# coding:utf-8

import math
import re

def main(params):
    n,k = params[0].split()
    s = list(params[1])
    k = int(k)
    s[k-1] = s[k-1].lower()
    print ''.join(s)

if __name__ == "__main__":
    cnt = 2 # TODO: edit here
    params = []
    for i in range(cnt):
        param = raw_input()
        params.append(param)
    main(params)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# abc126/abc126_a
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N, K = i2nn()
    S = list(i2s())
    S[K-1] = S[K-1].lower()
    print(''.join(S))

main()

Submission status: Accepted

Solution code:
# coding: UTF-8
# sample code

v1 = list(map(int, input().split()))
v2 = input()
n, k = v1[0], v1[1]
s = v2
result = ''

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

print(result)

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:
def main():
    NK = list(map(int, input().split()))
    S = input()
    N, K = NK[0], NK[1]
    ans = ""
    for i in range(0, N):
        if i == K-1:
            ans += S[i].lower()
        else:
            ans += S[i]
    print(ans)
main()

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = list(input())
c[b - 1] = c[b - 1].lower()
d = ''.join(c)
print(d)

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

Submission status: Accepted

Solution code:
k=input().split()
string=input()

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

Submission status: Accepted

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

c = s[k-1]
s[k-1] = c.lower()
for x in s:
    moji += x
print(moji)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if str_abc[k-1] == 'A':
  d = 'a'
elif str_abc[k-1] == 'B':
  d = 'b'
elif str_abc[k-1] == 'C':
  d = 'c'

str_abc = str_abc[:k-1] + d + str_abc[k:]
print(str_abc)

Submission status: Accepted

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

out=''
for n in range(N):
    if n+1 == K:
        if S[n]=='A':
            out=out+'a'
        elif S[n]=='B':
            out+='b'
        elif S[n]=='C':
            out+='c'
    else:
        out+=S[n]
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(c for c in 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:
a='abcdefghijklmnopqrstuvwxyz'
b='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
d={}
for i in range(26):
    d[b[i]]=a[i]
n,k=map(int,input().split())
S=list(input().strip())
t=S[k-1]
S[k-1]=d[t]
print(*S,sep='')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
mozi = input()
lista = []
for a in mozi:
    lista.append(a)

lista[b-1] = lista[b-1].lower()
print("".join(lista))

Submission status: Accepted

Solution code:
argN,argK = list(map(int,input().split()))
argS = input()

if argK == 1:
  ans = argS[0].lower() + argS[1:argN]
elif argK == argN:
  ans = argS[:argK-1] + argS[argK-1].lower()
else:
  ans = argS[:argK-1] + argS[argK-1].lower() + argS[argK:argN]

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

if k == 1:
    print(s[k-1].lower()+s[k:])
elif k == n:
    print(s[:k-1]+s[k-1].lower())
else :
    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 = input().split()
ki = int(k) - 1
str_array = input()

for i,v in enumerate(str_array):
    if ( i == ki):
        if (v == "A"):
            print("a",end="")
        elif ( v == "B"):
            print("b",end="")
        else :
            print("c",end="")
    else :
        print(v,end="")
print()

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())
small=str.swapcase(s[k-1])
s.pop(k-1)
s.insert(k-1,small)
print("".join(s))

Submission status: Accepted

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

S = str(input())
a = S[k-1].lower()
A = S[:k-1]
A += a
A = A + S[k:]
print(A)

Submission status: Accepted

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

s=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:
import sys
args = sys.stdin.readlines()
n, k = map(int, args[0].split(' '))
s = []
for i, x in enumerate(args[1]):
  if i == k - 1:
    s.append(x.lower())
  else:
    s.append(x)
print(''.join(s))

Submission status: Accepted

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

a, b = (int(i) for i in input().split())
s = input()

#print(a,b,s,s.lower())
if b==1:
  s = s[b-1].lower() + s[b:]
elif b==a:
  s = s[:b-1]+s[b-1].lower()
else:
  s=s[:b-1]+s[b-1].lower()+ s[b:]

print(s)

Submission status: Accepted

Solution code:
import sys
import math
sys.setrecursionlimit(10**6)
from collections import defaultdict

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

Submission status: Accepted

Solution code:
import sys

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

new_word = []

for i in range(int(N)):
    if i+1 == int(K):
        new_word.append(S[i].lower())
    else:
        new_word.append(S[i])

A = ''.join(new_word)
print(A)

Submission status: Accepted

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

if letters[K-1] == 'A':
  letters[K-1] = 'a'
elif letters[K-1] == 'B':
  letters[K-1] = 'b'
elif letters[K-1] == 'C':
  letters[K-1] = 'c'

print(''.join(letters))

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:
Input = input().split()
N = int(Input[0])
K = int(Input[1])
S = list(input())

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

S = "".join(S)

print(S)

Submission status: Accepted

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

i = 0
for c in s:
    if i != k-1:
        print(c,end="")
    else:
        if c == "A":
            print("a",end="")
        elif c == "B":
            print("b",end="")
        elif c == "C":
            print("c",end="")
    i += 1

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

Submission status: Accepted

Solution code:

def main():
    N, K = map(int, [int(x) for x in input().split()])
    S = input()

    ans = ""
    for i, n in enumerate(S):
        if i == K-1:
            n = n.lower()
        ans += n
    print(ans)
    return ans


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:
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 = ""
for tmp in s:
    ans += tmp
print(ans)

Submission status: Accepted

Solution code:
N, K = [int(i) for i in input().split()]
S = input()
if S[K-1] == 'A':
    x = 'a'
elif S[K-1] == 'B':
    x = 'b'
elif S[K-1] == 'C':
    x = 'c'
S = S[:K-1] + x + S[K:]
print(S)

Submission status: Accepted

Solution code:
import sys
import numpy as np

def main():
  input = sys.stdin.readline
  N, K = map(int, input().split())
  INF = N * K
  dp = input().strip()
  text =""
  for i in range(N):
    if i == K-1:
      text = text + dp[i].lower()
    else:
      text = text + dp[i]
  print(text)
  
main()

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

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

S1 = S[:K-1]
S2 = S[K-1]
S3 = S[K:]

Ans = S1+ str.lower(S2) + S3
print(Ans)

Submission status: Accepted

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

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

print(s0)

Submission status: Accepted

Solution code:
n, k = list(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([str(i) for i in s]))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

print(s)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
n, k = map(int, raw_input().split())

# 文字列の入力
str = list(raw_input())

str[k-1] = str[k-1].lower()
# 出力
newstr = "".join(str)
print(newstr)

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

Submission status: Accepted

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

S = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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


def main(n, k, s):
    l = list(s)
    # print(l)
    l[k - 1] = l[k - 1].lower()
    print(''.join(l))
        
if __name__ == '__main__':
    try:
        n, k = list(map(int, input().strip().split(' ')))
        s = input().strip()
        main(n, k, s)
    except EOFError:
        pass

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# vim: set fileencoding=utf-8:

import sys


def main():
    N, K = [int(ele) for ele in input().split()]
    N = N - 1
    K = K - 1
    S = list(input())
    S[K] = S[K].lower()
    print("".join(S))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

print(new)

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
S = list(input())
ans = ""
if S[K-1] == "A":
  S[K-1] = "a"
if S[K-1] == "B":
  S[K-1] = "b"
if S[K-1] == "C":
  S[K-1] = "c"
for n in S:
    ans += n
print(ans)

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