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=(int(x) for x in input().split())
K-=1
S=input()
output=""
for i in range(0,N):
    
    if (i==K):
        if (S[K]=="A"):
            output+="a"
        elif(S[K]=="B"):
            output+="b"
        elif(S[K]=="C"):
            output+="c"
    else:
        output+=S[i]
print(output)

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:
# -*- coding: utf-8 -*-
# input
n, k = map(int, input().split())
s = input()

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

Submission status: Accepted

Solution code:
#-------------------------------------------------------------------
import sys
def p(*a):
  s=" ".join(map(str,a))
  #print(s)
  sys.stderr.write(s+"\n")
#-------------------------------------------------------------------

N, K = map(int, input().split())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7
S = input()


a=""
b=S[K-1].lower()
c=S[K:]
if K-1>=0: a=S[:K-1]
print(a + b + c)

#p(a)
#p(b)
#p(c)

Submission status: Accepted

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

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:
def main():
    N, K = map(int, input().split())
    S = input()

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

    print(S[:K-1] + char + S[K:N])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#coding:utf-8

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

li = []

for i in range(N):
    if i != K-1:
        li.append(S[i])
    else:
        if S[i] =="A":
            li.append("a")
        if S[i] =="B":
            li.append("b")
        if S[i] == "C":
            li.append("c")
print(''.join(li))

Submission status: Accepted

Solution code:
N,K= list(map(int,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'
Snew = ''.join(S)
print(Snew)

Submission status: Accepted

Solution code:
N,K = map(int, input().split())
S = list(input())
s = S.pop(K-1)
s = s.lower()
S.insert(K-1, s)
ans = ""
for x in S:
    ans += x
print(ans)

Submission status: Accepted

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

if S[K]=="A":
    S[K] = "a"
elif S[K]=="B":
    S[K] = "b"
elif S[K]=="C":
    S[K] = "c"
for i in S:
  print(i, end ="")

Submission status: Accepted

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

Submission status: Accepted

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

if s[k-1]=="A":
    s[k-1]="a"
elif s[k-1]=="B":
    s[k-1]="b"
elif s[k-1]=="C":
    s[k-1]="c"
    
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,i=input().split(" ")

_str=list(input())

_str[int(i)-1]=_str[int(i)-1].lower()
_str="".join(_str)
print(_str)

Submission status: Accepted

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

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

Submission status: Accepted

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

if S[K-1] == "A":
    S[K-1] = "a"
    print("".join(S))
elif S[K-1] == "B":
    S[K-1] = "b"
    print("".join(S))
elif S[K-1] == "C":
    S[K-1] = "c"
    print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

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

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

print(Ans)

Submission status: Accepted

Solution code:
#d=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
#import numpy as np
#n=int(input())
#li=input().split()
#import fractions
#n=int(input())

lis=list(map(int,input().split()))
S=input()

if S[lis[1]-1]=="A":
    ans=S[:lis[1]-1]+"a"+S[lis[1]:]
elif S[lis[1]-1]=="B":
    ans=S[:lis[1]-1]+"b"+S[lis[1]:]
elif S[lis[1]-1]=="C":
    ans=S[:lis[1]-1]+"c"+S[lis[1]:]

print(ans)

Submission status: Accepted

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

for i in range(len(s)):
    if i==k-1:
        if s[k-1]=='A':
            print('a',end='')
        elif s[k-1]=='B':
            print('b',end='')
        elif s[k-1]=='C':
            print('c',end='')
    else:
        print(s[i],end='')

print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

string = input()
list_string = list(string)

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

Submission status: Accepted

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

S = input()

string = list(S)

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

print(''.join(string))

Submission status: Accepted

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

if k == 1:
    ans = s[k-1].lower()+s[1:]
else:
    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())
t = ""
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 i in range(n):
    t = t+s[i]
print(t)

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = input()
T = []
for i, s in enumerate(S):
    if i == K - 1:
        T.append(s.lower())
    else:
        T.append(s)

print(''.join(T))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
n, k = map(int, input().split())
# 文字列の入力
s = input()
news = ""
for i in range(0, n):

    if i == k-1:
        news += s[i].lower()
    else:
        news += s[i]
print(news)

Submission status: Accepted

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

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

s = ''.join(S)

print(s)

Submission status: Accepted

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

    res = ""
    if k-1 >= 1:
        res += s[0:k]
    res += s[k].lower()

    if k+1 <= n:
        res += s[k+1:]
    print(res)

solve()

Submission status: Accepted

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

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

S = input("")

S = S[0:(K-1 if K-1 >= 0 else 0)] + S[K-1].lower() + S[K:]

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

print("".join(S_list))

Submission status: Accepted

Solution code:
n,k = [int(x) for x in input().split(" ")]
s = input()
ans = ""
for i,string in enumerate(s):
    if i == k-1:
        ans += string.lower()
    else:
        ans += string

print(ans)

Submission status: Accepted

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

target = s[k-1]
rep = 'a'
if target == 'A':
    rep = 'a'
elif target == 'B':
    rep = 'b'
else:
    rep = 'c'

res = s[:k-1] + rep + s[k:]
print(res)

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

s[k-1]=s[k-1].lower()
result=''
for i in range(len(s)):
    result+=s[i]
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

S_changed = "".join(S_list)
print(S_changed)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

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

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

print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
T,K = (i for i in input().split())
N = input()
K = int(K)
X = list(N)
if X[K-1] == 'A':
    X[K-1] = 'a'
if X[K-1] == 'B':
    X[K-1] = 'b'
if X[K-1] == 'C':
    X[K-1] = 'c'
print(''.join(X))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
N, K = input().split()
N = int(N)
K = int(K)
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 = 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 = [int(a) for a in input().split()]
s = list(input())

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

print("".join(s))

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

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

n, k = na()
s = ns()

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


print(ans)

Submission status: Accepted

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

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

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

print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A = list(map(lambda x: int(x),input().split()))
N = A[0]
K = A[1]
s = input()
s_1 = s[:K-1]
s_2 = s[K-1:].lower().capitalize().swapcase()
#print(s_1)
#print(s_2)

print(s_1 + s_2)

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = list(i for i in 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:
# -*- coding: utf-8 -*-
"""
Created on Sun May 19 21:06:16 2019

@author: Yamazaki Kenichi
"""

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

t = {'A':'a','B':'b','C':'c'}

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

Submission status: Accepted

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

inputs = input().split(' ')
N = int(inputs[0])
K = int(inputs[1]) - 1
S = input()

r = ''
for i, s in enumerate(S):
    if i == K:
        s = chr(ord(s) + 32)
    r += s
print(r)

Submission status: Accepted

Solution code:
number = input().split()
text = input()

text_list = list(text)

text_list[int(number[1]) - 1] = text_list[int(number[1]) - 1].lower()
for i in text_list:
    print(i,end="")

Submission status: Accepted

Solution code:
inp = input()
s = input()
inp_st = inp.split()
n = int(inp_st[0])
k = int(inp_st[1])
ans = ""
for i, st in enumerate(s):
    if i == k - 1:
        ans = ans + st.lower()
    else:
        ans = ans + st
print(ans)

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:
x = [int(i) for i in input().split()]
n = x[0]
index = x[1]
s = input()
tmp = s[index-1:index].lower()
s  =  s[:index-1] + tmp + s[index:]
print(s)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
l = list(map(int,input().split()))
N = l[0]
K = l[1]
s = input()
ans = ""

for i in range(N):
    if i != K - 1:
        ans += s[i]
    else:
        a = s[i]
        a = a.lower()
        ans += a


print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
import sys

(n,k) = map(int, input().split())
s = input()
ret = ""
for i,v in enumerate(s):
  if i+1 == k:
    ret = ret + v.lower()
  else:
    ret = ret + v
print(ret)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N, K = map(int, input().split(" "))
S = input()
d = {"A": "a", "B": "b", "C": "c"}
r = ""
for i, s in enumerate(S):
    if i == K-1:
        r += d[s]
    else:
        r += s
print(r)

Submission status: Accepted

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

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

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

new_S = "".join(S_list)

print(new_S)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

# -*- coding: utf-8 -*-
"""
Created on Sat Apr 13 09:53:12 2019

@author: Owner
"""
import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


"""
N, X = map(int, input().split())

x = list(map(int, input().split()))

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())

# 多次元配列の宣言（あとでintにすること。）（タプルにすること。）
dp = np.zeros((N+1, 4,4,4))
    
all(nstr.count(c) for c in '753')

# 複数配列を並び替え
ABT = zip(A, B, totAB)
result = 0
# itemgetterには何番目の配列をキーにしたいか渡します
sorted(ABT,key=itemgetter(2))
A, B, totAB = zip(*ABT)
A.sort(reverse=True)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break
# 累積和
add = 1 # 問題によって決まる
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)

#２分探索
li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    

#ソート関数
org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)
# [3, 1, 4, 5, 2]
# [1, 2, 3, 4, 5]

#Distance Transformation
    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

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

def main():
    k=K-1
    if S[k]=="A":
        S[k] = "a"
    if S[k]=="B":
        S[k] = "b"
    if S[k]=="C":
        S[k] = "c"
    print("".join(S))
                
                
                
    
    
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=str(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(''.join(S))

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

s=input()

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

Submission status: Accepted

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

str_list = list(S)

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

s = ''

for x in str_list:
    s += x

print(s)

Submission status: Accepted

Solution code:
N, K = map(int, input().split())  #複数数値入力
S = input()
S = S[:K-1] + S[K-1].lower() + S[K:]
print(S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K = map(int, input().split()) # 複数値入力
S = str(input()) # 数値入力

new = []
[new.append(S[c]) for c in range(N)]
change = new[K-1]
if change == "A":
  new[K-1] = "a"
elif change == "B":
  new[K-1] = "b"
elif change == "C":
  new[K-1] = "c"
  
#print(new)
print("".join(new))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

print(strings)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = input()
s=""
for x in S:
    if(len(s)==K-1):
        s+=x.lower()
    else:
        s+=x
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = ''
for i in range(n):
  if i == k-1:
    if s[i] == 'A':
      ans += 'a'
    elif s[i] == 'B':
      ans += 'b'
    else:
      ans += 'c'
  else:
    ans += s[i]
print(ans)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input()
s[k-1].lower()
for i in range(len(s)):
    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 = 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:
# -*- coding: utf-8 -*-
n,k = list(map(int,input().split()))
s = input()

ret = "".join([i if n != k-1 else i.lower() for n,i in enumerate(s)])
print(ret)

Submission status: Accepted

Solution code:
import math
import random


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

sr = ""

for i in range(n):
    if i+1 == k:
        sr += s[i].lower()
    else:
        sr += s[i].upper()
print (sr)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split(" "))
S = input()
S_list = ["l" for k in range(N)]
for i in range(N):
    S_list[i] = S[i]

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

A = ""
for j in range(N):
    A += S_list[j]

print(A)

Submission status: Accepted

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

import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    token = lines[0].split()
    n = int(token[0])
    k = int(token[1])
    s = lines[1]

    return (n, k, s)


def solve(n, k, s):

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




def main():
    # 出力

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

Submission status: Accepted

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

se = ''
for i in range(N):
    if i == K-1:
        se += S[K-1].lower()
    else:
        se += S[i]
print(se)

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

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

Submission status: Accepted

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

S = input()

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

print('')

Submission status: Accepted

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

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

# スペースなしの入力
S = list(input())
s = S[K-1]

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

print(''.join(S))

Submission status: Accepted

Solution code:
from sys import stdin

n, k = [int(x) for x in stdin.readline().rstrip().split()]
s = stdin.readline().rstrip()

k -= 1
if s[k]=='A':
  ans = s[0:k] + "a" + s[k+1:n]
elif s[k]=='B':
  ans = s[0:k] + "b" + s[k+1:n]
elif s[k]=='C':
  ans = s[0:k] + "c" + s[k+1:n]

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

for i in range(n):
  if i+1 == k:
    if s[i] == 'A':
      ans.append('a')
    elif s[i] == 'B':
      ans.append('b')
    elif s[i] == 'C':
      ans.append('c')
  else:
    if s[i] == 'A':
      ans.append('A')
    elif s[i] == 'B':
      ans.append('B')
    elif s[i] == 'C':
      ans.append('C')
    
      
print(''.join(ans))

Submission status: Accepted

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

result = ""
for i in range(N) :
    temp = moji[i]
    if i==K-1 :
        temp = moji[i].lower()
    result =  result + temp
print(result)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/abc126/tasks/abc126_a

intext1 = input()
[n, k] = map(int, intext1.split())

intext2 = input()

outtext = intext2[:k-1] .lower()
if k == 1:
    outtext = intext2[0].lower() + intext2[1:]
elif k == n:
    outtext = intext2[:k-1] + intext2[k-1].lower()
else:
    outtext = intext2[0:k-1] + intext2[k-1].lower() + intext2[k:]

print(outtext)

Submission status: Accepted

Solution code:

inputs = input().split()
n = int(inputs[0])
k = int(inputs[1])
s = input()

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

print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N ,K=map(int ,raw_input().split())
S =raw_input()
s = S[K-1]
s = s.lower()
S1 = ''
if K > 1:
    S1 = S[:K-1]
S2 = ''
if K<N:
    S2 = S[K:]
s =S1+s+S2
print s

Submission status: Accepted

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

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

Submission status: Accepted

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

front = s[:k-1]
back = s[k:]
target = s[k-1].lower()

answer = front + target + back
print(answer)

Submission status: Accepted

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

S=input()
K=K-1
s=S
s=str.lower(s)
ans=''
for _ in range (N):
    if _==K:
        ans+=s[_]
    else:
        ans+=S[_]
print(ans)

Submission status: Accepted

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

for i in range(len(S)):
    if i == K-1:
        S[i] = S[i].lower()
print(''.join(S))

Submission status: Accepted

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

# In[18]:


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


# In[19]:


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


# In[21]:


print("".join(S))


# In[ ]:

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,M = map(int,input().split())
S = str(input())
tmp  = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
tmp2 = "abcdefghijklmnopqrstuvwxyz"
ans = ""
for i in range(N):
    if i==M-1:
        for j in range(26):
            if S[M-1]==tmp[j]:
                ans += tmp2[j]
                break
    else:
        ans += S[i]
print(ans)