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

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

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

print(output)

Submission status: Accepted

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

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

_ans = str()

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

print _ans

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
N, K = map(int, input().split())
s = input()
for i in range(N):
  if(i==(K-1)):
    sys.stdout.write(s[i].lower())
  else:
    sys.stdout.write(s[i])
print()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

s = list(S)

s[K-1] =  s[K-1].lower()
ans = ""
for x in s:
    ans+=x

print(ans)

Submission status: Accepted

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

S[K-1] = chr(ord(S[K-1]) + 32)[0]

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

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

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

mojiretsu = "".join(S)

print(mojiretsu)

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

Submission status: Accepted

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

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

s_tikan = s[:k-1] + tikan + s[k:]
print(s_tikan)

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 convert(c):
    if c == 'A':
        return 'a'
    elif c == 'B':
        return 'b'
    return 'c'

nk = input()
nk = nk.split(' ')
nk = [int(a) for a in nk]

k = nk[1]
s = input()

result = s[:k-1]
result += convert(s[k - 1])
result += s[k:]
print(result)

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:

# coding: utf-8

# In[ ]:

import sys
input = sys.stdin.readline
N, K = map(int, input().split())
S = input()


# In[5]:

ks = S[K-1].lower()
#ks = ks.lower()
#start_i = i-1 if i>0 else 0
S = S[:K-1] + ks + S[K:]
print(S)


# In[ ]:

Submission status: Accepted

Solution code:
import itertools
import fractions
from functools import reduce

a = [int(s) for s in input().split(' ')]
S = input()

str_list = list(S)
str_list[a[1] - 1] = str_list[a[1] - 1].lower()

print("".join(str_list))

Submission status: Accepted

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

from sys import stdin
    
def main():
    n,k = [int(x) for x in stdin.readline().rstrip().split()]
    s = stdin.readline().rstrip()

    ans = s[0:max(0,k-1)] + s[k-1].lower() + s[k:n]
    print(ans)
    
if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:

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

S=str(input())
q=S[K-1]
#print(q)

if q == "A":
    w="a"
elif q=="B":
    w="b"
else:
    w="c"
e=""
for i in range(N):
    if i != K-1:
        e=e+S[i]
    else:
        e=e+w
print(e)

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
t = list(input())
d = {"A":"a","B":"b","C":"c"}
s = ""
for i,n in enumerate(t):
    if i+1 ==k:
        s+=d[n]
    else:
        s+=n
print(s)

Submission status: Accepted

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

if s[k] == 'A':
    sr = 'a'
elif s[k] == 'B':
    sr = 'b'
else:
    sr = 'c'
    
s1 = s[:k] + sr + s[k+1:]

print(s1)

Submission status: Accepted

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

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'
elif s_list[k-1] == 'C':
    s_list[k-1] = 'c'
print("".join(s_list))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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:
n,k=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'
elif s[k-1]=='C':
    s[k-1]='c'
s= "".join(s)
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
# スペース区切りの整数の入力
a, b = map(int, input().split())
# 文字列の入力
s = [i for i in input()]

s[b - 1] = s[b - 1].lower()
print(''.join(s))

Submission status: Accepted

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

if S_list[K-1] == 'A':
     S_list[K-1] = 'a'

if S_list[K-1] == 'B':
     S_list[K-1] = 'b'

if S_list[K-1] == 'C':
     S_list[K-1] = 'c'

S_changed = "".join(S_list)

print(S_changed)

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

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

print("".join(S_list))

Submission status: Accepted

Solution code:
n, k = map(int,input().split())
s = input()
dic = {"A": "a","B":"b","C":"c"}
print(s[:k-1] + dic[s[k-1]] + s[k:])

Submission status: Accepted

Solution code:
N, K = map(int,input().split())
S = [c for c in 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())
ans = ""
for i in range (N):
    if i != K-1:
        ans += S[i]
    else:
        ans += S[i].lower()
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:
a = map(int,input().split())
a = list(a)
b = input()
b = list(b)
for i in range(a[0]):
    if i == (a[1] - 1):
        b[i] = b[i].lower()
    print(b[i],end = '')

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"
elif s_list[k-1] == "C":
	s_list[k-1] = "c"
s_change = "".join(s_list)
print(s_change)

Submission status: Accepted

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

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


print(''.join([ str(item) for item in S ]))

Submission status: Accepted

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

def convert(character):
    return chr(ord(character[0]) + 32)

print(S[0:K-1]+ convert(S[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(''.join(S))

Submission status: Accepted

Solution code:
n, k = [int(i) for i in 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 = [int(x) for x in input().strip().split()]
s = input().strip()
print(s[:k-1]+s[k-1].lower()+s[k:])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inputa = input().split()
inputb = list(input())
if inputb[int(inputa[1])-1] == "A":
  inputb[int(inputa[1])-1] = "a"
if inputb[int(inputa[1])-1] == "B":
  inputb[int(inputa[1])-1] = "b"
if inputb[int(inputa[1])-1] == "C":
  inputb[int(inputa[1])-1] = "c"

print("".join(inputb))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

for i in S:
    print(i,end='')

print('\n')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a = list(map(int, input().split()))
b=input()
for i in range(len(b)):
    if i==a[1]-1:
        print(b[i].lower(),end="")
    else:
        print(b[i],end="")

Submission status: Accepted

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


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

print(S2)

Submission status: Accepted

Solution code:
import sys

def solve(n, s, k):
    ans = s[0:k-1] + s[k-1].lower()
    if k < n:
      ans += s[k:n]
    return ans

if __name__ == '__main__':

    n, k = map(int, sys.stdin.readline().strip().split(" "))
    s = sys.stdin.readline().strip()
    ans = solve(n, s, k)
    print ans

Submission status: Accepted

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

Submission status: Accepted

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

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()
if S[K-1]=="A":
    ans=S[:K-1]+"a"+S[K:]
elif S[K-1]=="B":
    ans=S[:K-1]+"b"+S[K:]
if S[K-1]=="C":
    ans=S[:K-1]+"c"+S[K:]
print(ans)

Submission status: Accepted

Solution code:
# def gcd(a_gcd, b_gcd):
#     while b_gcd != 0:
#         a_gcd, b_gcd = b_gcd, a_gcd % b_gcd
#     return a_gcd
#
#
# def lcm(a_lcm, b_lcm):
#     return a_lcm * b // gcd(a_lcm, b_lcm)
#
#
# def max_sum(N_max_sum, a_max_sum):
#     dp = [0] * (N_max_sum + 1)
#     for i in range(N_max_sum):
#         dp[i + 1] = max(dp[i], dp[i] + a_max_sum[i])
#     return dp[N]
#
#
# def knapsack(N_knapsack, W, weight, value):
#     inf = float("inf")
#     dp = [[-inf for _ in range(W+1)] for j in range(N_knapsack + 1)]
#     for i in range(W+1):
#         dp[0][i] = 0
#
#     for i in range(N_knapsack):
#         for w in range(W+1):
#             if weight[i] <= w:
#                 dp[i+1][w] = max(dp[i][w-weight[i]]+value[i], dp[i][w])
#             else:
#                 dp[i+1][w] = dp[i][w]
#     return dp[N_knapsack][W]

# n = int(input())
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].lower()
for i in S :
    print(i, end='')

Submission status: Accepted

Solution code:
Q,V = map(int,input().split())
N = str(input())
Na = N[V-1]
na = Na.lower()

print(N[:V-1]+na +N[V:])

Submission status: Accepted

Solution code:
N,K = tuple(map(int,input().split()))
S = input()
K = K-1
print(S[:K]+{"A":"a","B":"b","C":"c"}[S[K]]+S[K+1:])

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input()
d = {"A":"a", "B":"b", "C":"c"}

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input()
in_arr = [l for l in s]
new_lower = s[k-1].lower()
in_arr[k-1] = new_lower
ans = ''
for letter in in_arr:
  ans += letter
print(ans)

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
S=input();K-=1
def change(k):
    t=ord(k)
    return chr(t-65+97)
print(S[:K]+change(S[K])+S[K+1:])

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'
# またリストから文字列へ戻す
str_changed = "".join(str_list)
print(str_changed)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)

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

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

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

s[k-1] = a

print("".join(s))

Submission status: Accepted

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

S = input()

s_dic = {"A":"a", "B":"b", "C":"c", "D":"d",
         "E":"e", "F":"f", "G":"g", "H":"h",
         "I":"i", "J":"j", "K":"k", "L":"l",
         "M":"m", "N":"n", "O":"o", "P":"p", "Q":"q",
         "R":"r", "S":"s", "T":"t", "U":"u",
         "V":"v", "W":"w", "X":"x", "Y":"y", "Z":"z"
        }

output = ""
for i in range(len(S)):
    if i == K - 1:
        output += s_dic[S[i]]
    else:
        output += S[i]

print(output)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from string import ascii_lowercase, ascii_uppercase

n, k = map(int, input().split())
s = input()
d = dict(zip(ascii_uppercase, ascii_lowercase))
print(s[:k - 1] + d[s[k - 1]] + s[k:])

Submission status: Accepted

Solution code:
import os, sys, re, math

n,k = [int(s) for s in input().split(' ')]
s = input()

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
m,n=map(int,input().split(" "))
s=input()
ans=""
for i in range(m):
    t=s[i]
    if(i==n-1):
        t=s[i].lower()
    ans+=t
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'


print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(''.join(s))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
NK = [int(i) for i in input().split()]
S = input()
low = S[NK[1] - 1].lower()
answer = ""
for i in range(NK[0]):
    if(i == NK[1] - 1):
        answer += low
    else:
        answer += S[i]
print(answer)

Submission status: Accepted

Solution code:
N,K=(int(x) for x in input().split())
A=list(input())

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

Submission status: Accepted

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

line[k - 1] = line[k-1].swapcase()

print("".join(line))

Submission status: Accepted

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

d = {"A":"a", "B":"b", "C":"c"}
s[k-1] = d[s[k-1]]
print("".join(s))

Submission status: Accepted

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

for i, _ in enumerate(S):
    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())

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

print(''.join(s))

Submission status: Accepted

Solution code:
n, k = [int(n) for n 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())

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

S = "".join(S)

print(S)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
arr = input().split(' ')
N = int(arr[0])
K = int(arr[1])
K = K-1
S = input()
bef = S[:K]
aft = S[K+1:]
ans = bef + S[K].lower() + aft
print(ans)

Submission status: Accepted

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

ans = ''
i = 1
for s in S:
    if i == K:
        ans += s.lower()
    else:
        ans += s
    i += 1

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys

input = sys.stdin.readline
n, k = map(int, input().split())
s = input().strip()
l = list(s)
l[k - 1] = l[k - 1].lower()
t = "".join(l)
print(t)

Submission status: Accepted

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

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())
S[K-1] = S[K-1].lower()
ans = ""
for i in S:
    ans += 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 = 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=list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

Submission status: Accepted

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

print(a)

Submission status: Accepted

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

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

print(hoge)

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

print("".join(s))

Submission status: Accepted

Solution code:
*D, = open(0)
n, k = map(int, D[0].split())
s = D[1]
ret = []
for i, it in enumerate(s):
    if i == k-1:
        c = s[i].lower()
    else:
        c = s[i]
    ret.append(c)
print(''.join(ret))

Submission status: Accepted

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

S = input()

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

print(replaced_S)

Submission status: Accepted

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

import string
for i in range(26):
    if S[K - 1] == string.ascii_uppercase[i]:
        S[K - 1] = string.ascii_lowercase[i]
        print(*S, sep='')
        exit()

Submission status: Accepted

Solution code:
###
### atcorder test program
###

import sys

### math class
class math:
    ### pi
    pi = 3.14159265358979323846264338

    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    ### LCM
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

math = math()

### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()

### input sample
#i = input()
#A, B, C = [x for x in input().split()]
#inlist = [int(w) for w in input().split()]
#R = float(input())
#A = [int(x) for x in input().split()]
#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")

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

K -= 1

print(S[:K],end="")
print(S[K:K+1].lower(),end="")
print(S[K+1:])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

str_list = list(c)
index = b - 1
str_list[index] = str_list[index].lower()
str_changed = "".join(str_list)
print(str_changed)

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"
if str_list[K-1] == "B":
    str_list[K-1] = "b"
if str_list[K-1] == "C":
    str_list[K-1] = "c"
ans = "".join(str_list)
print(ans)

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

ans = S[0:K-1] + S[K-1].lower() + 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'
print(''.join(S))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(s2)

Submission status: Accepted

Solution code:
#A
N,K = (int(x) for x in input().split())

S = input()

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

print(XX)

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

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

output = ""
for i in range(listNK[0]):
    output = output + S[i]

print(output)

Submission status: Accepted

Solution code:
import math

A, B = list(map(int, input().split()))
S = input()

for i in range(A):
    if i + 1 == B:
        print(S[i].lower(), end="")
    else:
        print(S[i], end="")

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    [n, k] = li()
    s = input()
    output = ""
    for index, si in enumerate(s):
        if index + 1 == k:
            output = output + si.lower()
        else:
            output = output + si
    print(output)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    print(s)
if __name__ == "__main__":
    main()

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:
chars = {'A': 'a', 'B': 'b', 'C': 'c'}
line = [int(x) for x in input().split(' ')]
s = input()
i = 1
for c in s:
    if i == line[1]:
        print(chars[c], end='')
    else:
        print(c, end='')
    i = i + 1
print()

Submission status: Accepted

Solution code:
n_k = input().split()
s = input()
print(s[0:int(n_k[1]) - 1]+s[int(n_k[1]) -
                             1].lower() + s[int(n_k[1]):])

Submission status: Accepted

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

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

print(S)

Submission status: Accepted

Solution code:
N, K = [int(i) for i in input().split(" ")]
S = 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()
h = 'o'
if S[k-1] == 'A':
  h = 'a'
elif S[k-1] == 'B':
  h = 'b'
else:
  h = 'c'
print(S[:k-1]+h+S[k:])

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
from fractions import gcd
from functools import reduce
from itertools import combinations

import numpy as np

sys.setrecursionlimit(200000)


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


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


def solve():
    A, B = il()
    N = ii(str)
    a = []
    for i in range(A):
        a.append(N[i].lower() if i == B - 1 else N[i])
    return "".join(a)


if __name__ == "__main__":
    print(solve())

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n, k = list(map(int, input().split()))
s = input()
ans = ''
for i, c in enumerate(s):
    if i == k-1:
        ans += c.lower()
    else:
        ans += c

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k = map(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'

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