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

i = 1
r = ""
for char in S:
    if(i == K):
        char = char.lower()
    r += char
    i += 1
print(r)

Submission status: Accepted

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

Submission status: Accepted

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

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()
a,b,c = s[:k-1], s[k-1], s[k:]
print(a+b.lower()+c)

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:
def main():
	N, K = map(int, input().split())
	S = input()
	ans = S
	if K > N-1:
		ans = S[:K-1]+S[K-1:].lower()
	elif K > 1:
		ans = S[:K-1]+S[K-1:K].lower()+S[K:]
	else:
		ans = S[:1].lower()+S[1:]
	print(ans)


if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
import sys


def parse(file):
    n, k = map(int, file.readline().split())
    s = file.readline()
    return n, k, s


def main(n, k, s):
    orig = s[k-1]
    return s[:k-1] + str.lower(orig) + s[k:]

if __name__ == '__main__':
    print(main(*parse(sys.stdin)))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(st)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
#b=input()
b=[i for i in input()]
n=a[1]-1
tmp=b[n]
if tmp=="A":
    b[n]="a"
if tmp=="B":
    b[n]="b"
if tmp == "C":
    b[n]="c"
    
    
print("".join(b))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
import math

def main():
    n, k = map(int, input().split())
    string = input()
    new_string = ""
    for i in range(len(string)):
        if i == k - 1:
            new_string += string[i].lower()
        else:
            new_string += string[i]
    print(new_string)

if __name__ == '__main__':
    main()

Submission status: Accepted

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


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


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

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())
a = list(input())
a[k-1]= a[k-1].lower()
print(''.join(a))

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

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

print(T)

Submission status: Accepted

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

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

print(''.join(S))

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc126_a
# Changing a Character


N, K = map(int, input().split())
S = input().strip()
S_replaced = "".join(c.lower() if i == K else c for i, c in enumerate(S, start=1))
print(S_replaced)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

S = input()

pre = S[0:K-1]

behind = S[K:]

new = pre+S[K-1].lower() + behind

print(new)

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

Submission status: Accepted

Solution code:
from sys import stdin

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

Submission status: Accepted

Solution code:
_,K = map(int,input().split())
s = input()
a = ""
for i in range(len(s)):
  if i is K-1:
    a += s[i].lower()
  else:
    a += s[i]
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'
else:
    S[K-1] = 'c'
print(''.join(S))

Submission status: Accepted

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

A = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
a = "abcdefghijklmnopqrstuvwxyz"

ans = S[0:K-1]+a[A.index(S[K-1])]+S[K:]
print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N, k = map(int, input().split())
S = input()
t = ''
for i in range(N):
    if i!=k-1:
        t += S[i]
    else:
        t += S[i].lower()
print(t)

Submission status: Accepted

Solution code:
import sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def II(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def SI(): return input()
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')

N, K  = LI()
S = SI().strip()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

t = S.pop(K-1)
if t == "A":
  S.insert(K-1, "a")
elif t == "B":
  S.insert(K-1, "b")
else:
  S.insert(K-1, "c")
S = "".join(S)
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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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, b = map(int, input().split())
s = list(input())
s[b-1] = s[b-1].lower()
print(*s, sep='')

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# AtCoder Beginner Contest 126
# https://atcoder.jp/contests/abc126
import sys
#import numpy as np

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

def main():
    N, K = i2nn()
    S = i2s()
    K -= 1
    s = S[:K] + S[K:K+1].lower() + S[K+1:]
    print(s)

main()

Submission status: Accepted

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


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

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

if __name__ == '__main__':
	import sys
	sys.exit(main())

Submission status: Accepted

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

Submission status: Accepted

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

if K == 1:
    S = S[0].lower() + S[1:]
elif K == N:
    S = S[:-1] + S[N-1].lower()
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 = list(input())
s[k - 1] = s[k - 1].lower()
print(''.join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(out_str)

Submission status: Accepted

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

Submission status: Accepted

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

print(solve())

Submission status: Accepted

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


out = ""
i = 1
for char in s:
    if i == k:
        out += char.lower()
    else:
        out += char
    i += 1

print(out)

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

import sys
input = sys.stdin.readline

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

for i, s in enumerate(S) :
    print(s.lower() if i == K - 1 else s, end="")

print()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=(map(int, input().split()))
N=input()
arr=""
for num,i in enumerate(N):
    if num+1==b:
        arr+=i.lower()
    else:
        arr+=i
print(arr)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

mi = lambda: map(int, input().split())
s  = lambda: input()

N, K = mi()
S = s()

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

Submission status: Accepted

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

Submission status: Accepted

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

if K == 1:
  ans = S[0].lower() + S[1:]
elif K == N:
  ans = S[:N-1] + S[N-1].lower()
else:
  ans = S[:K-1] + S[K-1].lower() + S[K:]
  
print(ans)

Submission status: Accepted

Solution code:
def main():
    n, k = [int(e) for e in input().split()]
    s = input()
    s = '{}{}{}'.format(s[:k - 1], s[k - 1].lower(), s[k:])
    print(s)


if __name__ == "__main__":
    main()

Submission status: Accepted

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


def main():
    n, k = list(map(int, input().split()))
    s = input()
    result = ''
    for i, st in enumerate(s):
        if i == k-1:
            result += st.lower()
        else:
            result += st
    print(result)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(''.join(S2))

Submission status: Accepted

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

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

print(res)

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

Submission status: Accepted

Solution code:
from sys import exit

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

a = []
for l in sys.stdin:
    a.append(l)

sent = a[1]
num = int(a[0].split()[1]) - 1
new_sent = [each_char for each_char in sent]
new_sent[num] = new_sent[num].lower()
new_sent = ''.join(new_sent)
print(new_sent)

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

Solution code:
#!venv/bin/python

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

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

print("".join(ans))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
input = sys.stdin.readline
 
# bisect_left(lists, 3)
# bisect_right(lists, 3)
 
def main():
	N, K = map(int, input().split(" "))
	S = input()
	S = S[:-1]
	S = list(S)

	K = K-1

	if S[K] == "A":
		S[K] = "a"
	elif S[K] == "B":
		S[K] = "b"
	elif S[K] == "C":
		S[K] = "c"

	ans = ""
	for i in S:
		ans += i
	print(ans)
		

if __name__ == "__main__":
	main()

Submission status: Accepted

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

ans = ""

for i in range(n):
    if i + 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()

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

Submission status: Accepted

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

import sys

input = sys.stdin.readline

def main():
    n, k = [int(e) for e in input().split(" ")]
    s = ""
    for i, r in enumerate(input()):
        if i == k-1:
            s += r.lower()
        else:
            s += r
    print(s)

main()

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

Submission status: Accepted

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

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 k in range(N):
    if k == K-1:
        ans += S[k].lower()
    else:
        ans += S[k]
print(ans)

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:
# coding: utf-8
# Your code here!

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

if str_list[K-1] == 'A':
    str_list[K-1] = 'a'
elif str_list[K-1] == 'B':
    str_list[K-1] = 'b'
if 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 = map(int,input().split())
S = input()
T = S.lower()
print(S[0:K - 1] + T[K - 1] + S[K:])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
large = ['A', 'B', 'C']
small = ['a', 'b', 'c']

n, index = map(int, input().split())
s = list(input())

s[index-1] = small[large.index(s[index-1])]

out = ''
for letter in s:
    out = out + letter

print(out)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
listS = list(input())
if k == 0:
    print(listS[0].lower()+"".join(listS[1:]))
elif k == n:
    print("".join(listS[:n-1])+listS[n-1].lower())
else:
    print("".join(listS[:k-1])+listS[k-1].lower()+"".join(listS[k:]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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


ret=s[0:k-1]+s[k-1].lower()+s[k:n]
print(ret)

Submission status: Accepted

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

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

print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k = k-1

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

print(result)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print("")

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

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

print(S)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
b, c = map(int, input().split())
s = input()
c =c-1
if(c != 0 and c != b-1):
    print(s[0:c] + s[c].lower() + s[c+1:])
elif(c==0):
    print(s[0].lower() + s[1:])
else:
    print(s[0:c] + s[c].lower())

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

Submission status: Accepted

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

s1 = S[0:K-1]
c = S[K-1]
s2 = S[K:]

if c == "A":
    c = "a"
elif c == "B":
    c = "b"
else:
    c = "c"

ans = s1 + c + s2
print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

print("".join(S))

Submission status: Accepted

Solution code:
import sys
import collections
from collections import Counter
from collections import deque
from collections import defaultdict
import itertools
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from itertools import takewhile
from itertools import compress
import functools
from functools import reduce
import math
####from math import gcd
####from math import inf
from math import ceil
from math import floor
##from math import log10
##from math import log2
##from math import log
from math import factorial
import re
from functools import lru_cache

# @lru_cache(maxsize=1000)

# MOD = 10 ** 9 + 7

# N = int(input())
# A = [int(x) for x in input().split()]
# V = [[0] * 100 for _ in range(100)]

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


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

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

print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = ""

for i in range(n):
    if i+1 == k:
        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()
t = ''
for i in range(n):
    if i == k - 1:
        t += chr(ord(s[i]) - ord('A') + ord('a'))
    else:
        t += s[i]
print(t)

Submission status: Accepted

Solution code:
# cook your dish here
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()
T = [S[i] for i in range(N)]

if T[K-1] == 'A':
    T[K-1] = 'a'
elif T[K-1] == 'B':
    T[K-1] = 'b'
else:
    T[K-1] = 'c'
U = ''.join(T)
print(U)

Submission status: Accepted

Solution code:
N, K = map(int, input().strip().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 =  ''
for i in range(n):
    if i == k - 1:
        if s[i] == 'A':
            t = t + 'a'
        elif s[i] == 'B':
            t = t + 'b'
        else:
            t = t + 'c'
    else:
        t = t + s[i]

print(t)

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
s=list(input())
l=[chr(i) for i in range(97, 97+26)]
L=[chr(i) for i in range(65, 65+26)]
s[k-1]=l[L.index(s[k-1])]
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()

ans = ""

for i in range(N):
    if i + 1 == K:
        ans += S[i].swapcase()
    else:
        ans += S[i]

print(ans)

Submission status: Accepted

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

a = s[:k-1]
c = s[k-1]
b = s[k:]

if c == 'A':
    print(a + 'a' + b)
elif c == 'B':
    print(a + 'b' + b)
else:
    print(a + 'c' + b)

Submission status: Accepted

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

if s[k-1] == "A":
    sub = "a"
elif s[k-1] == "B":
    sub = "b"
else:
    sub = "c"

print(s[0:k-1] + sub + s[k:n])

Submission status: Accepted

Solution code:
v = [int(d) for d in input().split()]
inpu = list(input())

inpu[v[1]-1] = inpu[v[1]-1].lower()
print(''.join(inpu))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: UTF-8
import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

n,k = readmi()
t = read()
ans = ""
for i in range(n):
    if i + 1 == k:
        ans += t[i].lower()
    else:
        ans += t[i]
print(ans)

Submission status: Accepted

Solution code:
N,K = map(int, input().split())
S = input()
S = [s for s in S]
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(N):
    if i+1 == K:
        ans += S[i].lower()
    else:
        ans += S[i]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import numpy as np
from functools import lru_cache
import time

def main(): 
    if True:
        N,K = list(map(int, input().split()))
        A = np.asarray(list(str(input())))
    else:
        pass
    A[K-1] = A[K-1].lower()

    print("".join(A))
if __name__ =='__main__':
    main()

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 = input()
for i, j in enumerate(list(s)):
  if i==k-1:
    print(j.lower(), end="")
  else:
    print(j, end="")

Submission status: Accepted

Solution code:

def input_from_console():
    n, k = map(int, input().split())
    s = input()
    return n, k, s


def main():
    n, k, s = input_from_console()
    rep = s[k - 1].lower()
    print(s[:k - 1] + rep + 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()

print('/'.join(S).replace('/', ''))

Submission status: Accepted

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

print(t)

Submission status: Accepted

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

n = int(n)
k = int(k)

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

Submission status: Accepted

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

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

print ans