Problem:


Score : 100 points

Problem Statement

You are given a string S of length N consisting of A, B and C, and an integer K which is between 1 and N (inclusive).
Print the string S after lowercasing the K-th character in it.

Constraints

1 ≤ N ≤ 50

1 ≤ K ≤ N

S is a string of length N consisting of A, B and C.

Input

Input is given from Standard Input in the following format:

N K
S

Output

Print the string S after lowercasing the K-th character in it.

Sample Input 1

3 1
ABC

Sample Output 1

aBC

Sample Input 2

4 3
CABA

Sample Output 2

CAbA



Sample input:
3 1
ABC


Sample output:
aBC

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# A - Changing a Character

n, k = map(int, input().split())
s = list(str(input()))
ans = []

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


print(''.join(ans))

Submission status: Accepted

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

s_li = [let for let in s]
s_li[k - 1] = s_li[k - 1].lower()

print(''.join(s_li))

Submission status: Accepted

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

Submission status: Accepted

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

print(''.join(S))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(0,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().strip())
S[k-1] = S[k-1].lower()
print(*S, sep='')

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input()
s_1 = s[k-1]
s_low = s_1.lower()
s_new = [i for i in s]
s_new[k-1] = s_low

print("".join(s_new))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
Big=["A","B","C"]
Small=["a","b","c"]

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

for i in range(3):
  if S[K-1]==Big[i]:
    S[K-1]=Small[i]

print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
S = input()
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())
a = s[k-1]
a = a.lower()
s[k-1] = a
b = ''.join(s)
print(b)

Submission status: Accepted

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

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

print(("").join(Ans))

Submission status: Accepted

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

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

S_str = "".join(S)
print(S_str)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections, math, bisect, re

local = False
if local:
    file = open("input.txt", "r")
    import time

def inp():
    if local:
        return file.readline().rstrip()
    else:
        return input().rstrip()

def ints():
    return [int(_) for _ in inp().split()]


if local:
    start=time.time()


N, K = ints()
S = inp()

ans = []

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

print("".join(ans))




if local:
    fin = (time.time()-start)*1000
    print("{:.2f}".format(fin) + "ms")

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

Submission status: Accepted

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

if c == "A":
    b[a[1]-1] = "a"
if c == "B":
    b[a[1]-1] = "b"
if c == "C":
    b[a[1]-1] = "c"

print("".join(b))

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"
        else: ans+="c"
    else:
        ans += s[i]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input().rstrip()
s2 = s.lower()
print(s[:k-1] + s2[k-1] + 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:
N, K = map(int, input().split())
S = input()
ans = S[:K-1]
ans += S[K-1].lower()
ans += S[K:]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

LETTERS="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
letters="abcdefghijklmnopqrstuvwxyz"

ind = LETTERS.index(S[K-1])

if K==1:
  print(letters[ind]+S[1:N])
elif K==N:
  print(S[0:N-1]+letters[ind])
else:
  print(S[0:K-1]+letters[ind]+S[K: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()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def SR(): return sys.stdin.readline().rstrip()

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))


n,k = MI()
s = list(SR())

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
List=list(input())
List[b-1]=List[b-1].lower()
print(*List,sep="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
S = input()
S = [S[i] for i in range(len(S))]
x = S[K-1]

if x == "A":
  S[K-1] = "a"
elif x == "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()

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

Submission status: Accepted

Solution code:
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# /home/remina/PycharmProjects/atcoder/A-500YenCoins.py
#

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,k = list(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()
if s[k-1] == "A":
    print(s[:k-1] + "a" +s[k:])
elif s[k-1] == "B":
    print(s[:k-1] + "b" +s[k:])
elif s[k-1] == "C":
    print(s[:k-1] + "c" +s[k:])

Submission status: Accepted

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

if s[k-1]=='A':
    s[k-1] = 'a'
if s[k-1]=='B':
    s[k-1] = 'b'
if s[k-1]=='C':
    s[k-1] = 'c'
print(''.join(s))

Submission status: Accepted

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

Submission status: Accepted

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

out =""

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

print(out)

Submission status: Accepted

Solution code:
NK = input().split()
N, K = int(NK[0]), int(NK[1])
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:
#!/usr/bin/env python3
n, k = map(int, input().split())
s = input()
print(s[:k-1] + s[k-1].lower() + s[k:])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n, k = map(int, input().split())
s = input()
ans = ""
for i in range(len(s)):
    if i + 1 == k:
        ans += s[i].lower()
    else:
        ans += s[i]
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

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

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = str(input())
t =""
number = 0
for a in s:
    if number + 1 == k:
        b = a.lower()
        t += b
        number += 1
    else:
        t += a
        number += 1

print(t)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_num = input().split()
input_str = input()

str_len = int(input_num[0])
change_num = int(input_num[1])

change_char = input_str[change_num -1]

change_char.lower()
print(input_str[:change_num -1] + change_char.lower() + input_str[change_num :])

Submission status: Accepted

Solution code:
#AtCoder
N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()
ans = ''
for i in S:
    ans += i
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import io

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

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
s=input()
if k==1:
    s=s[0].lower()+s[1:]
else:
    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()
ans = s[:k-1] + s[k-1].lower() + s[k:]
print(ans)

Submission status: Accepted

Solution code:
N,K = list(map(int, input().split()))
S = str(input())
s = [S[i] for i in range(len(S))]
s[K-1] = chr(ord(s[K-1])+32)
print(''.join(s))

Submission status: Accepted

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
n,k=MI()
s=input()
s1=s[0:k-1]
s2=s[k-1]
s3=s[k:n]
if s2=="A":
    s2="a"
if s2=="B":
    s2="b"
if s2=="C":
    s2="c"
print(s1,end="")
print(s2,end="")
print(s3)

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
S=list(map(str,input()))
if S[y-1]=="A":
    for i in range(x):
        S[y-1]="a"
        print(S[i],end="")
elif S[y-1]=="B":
    for i in range(x):
        S[y-1]="b"
        print(S[i],end="")
elif S[y-1]=="C":
    for i in range(x):
        S[y-1]="c"
        print(S[i],end="")

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = list(input())
s[k-1] = s[k-1].lower()
for c in s:
  print(c, end='')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def get_ints():
    return list(map(int, input().split()))

N, K = get_ints()
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 = 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:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    N, K = input_nums()
    S = input()
    print(S[0:K-1] + S[K-1].lower() + S[K:])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#A
n, k = map(int, input().split())
s = list(input())
s[k - 1]=s[k - 1].lower()
for i in s:
    print(i,end='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input()[2:])
s = list(input())
s[k-1] = chr(ord(str(s[k-1])) + 32)
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()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(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:
# ABC 126: A – Changing a Character
n, k = list(map(int, input().split()))
s = input()
print(s[:k - 1] + s[k - 1].lower() + s[k:])

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
p,q = input().split()
q_ = int(q) 
n = input()

print(n[:q_-1] + n[q_-1].lower() + n[q_:])

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

def main():
  n, k = map(int, readline().split())
  s = input()
  small = s[k-1].lower()
  print(s[:k-1] + small + s[k:])
  
  
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools
import fractions
def main():
  n,k = map(int,input().split())
  s = input()
  t = s[0:k-1] + s[k-1].lower()+s[k:]
  print(t)
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    if i != K-1:
        print(s[i], end='')
    else:
        print(str.swapcase(s[i]), end='')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n, k = map(int, sys.stdin.readline().split())
s = sys.stdin.readline().rstrip()

def main():
    res = s[:k-1] + s[k-1].lower() + s[k:]
    print(res)

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

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

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

print(''.join(S))

Submission status: Accepted

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

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

print("".join(array))

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()
ans = ''
for i in range(n):
    if i == k - 1:
        ans += S[i].lower()
    else:
        ans += S[i]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
s = input()
M = 'ABC'
m = 'abc'
print(s[:k-1] + m[M.index(s[k-1])] + s[k:])

Submission status: Accepted

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

Submission status: Accepted

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

if s[k] == 'A':
    print(str(s[0:k]) + 'a' + str(s[k+1:]))

elif s[k] == 'B':
    print(str(s[0:k]) + 'b' + str(s[k+1:]))

else:
    print(str(s[0:k]) + 'c' + str(s[k+1:]))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


for i in range(N):
    if(i+1 == K):
        S[i] = chr(ord(S[i]) + 32)
print(''.join(S))

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys, heapq, bisect, math, itertools, string, queue, copy, time
from fractions import gcd
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7
EPS = 10**-7


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

s = list(s)
s[k-1] = s[k-1].lower()
ans_s = ""
for i in s:
    ans_s += i
print(ans_s)

Submission status: Accepted

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

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:
def main():
    n, k = [int(i) for i in input().split()]
    s = [i for i in input()]
    s[k-1] = s[k-1].lower()
    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+1==k:
    ans+=s[i].lower()
  else:
    ans+=s[i]
    
print(ans)

Submission status: Accepted

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

S = S[:K-1] + chr(O+32) + S[K:]

print(S)

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

# print(solve())

# def solve()が@return voidのとき
solve()

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:
# coding: utf-8
N, K = map(int, input().split())
# print(N, K)
S = input()
# print(S)
# print(chr(ord(S[K -1]) + 32))
s = ""
for i in range(N):
    if i == K - 1:
        s += chr(ord(S[K -1]) + 32)
    else:
        s += S[i]
print(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 = 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] = str.lower(S[K-1])
print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

S = input()

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

print(ans)

Submission status: Accepted

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
n,k = map(int,input().split())
s = input()

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

print(*ans,sep="")
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
num,loc = map(int,input().split())
dummy = ["" for i in range(num)]
moj = input()
count = 0
for j in moj:
  dummy[count] = j
  count = count + 1
S = dummy[loc-1]
W = S.swapcase()
dummy[loc-1] = W
ans = ""
for l in dummy:
  ans = ans + l
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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