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())
a=list(input())
a[k-1]=chr(ord(a[k-1])+32)
print("".join(a))

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

print("".join(S))

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+chr(ord(S[i])+32)
    else:
        s=s+S[i]
print(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()

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

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input()
for i in range(k - 1):
    print(s[i], end = "")
print(chr(ord(s[k - 1]) + 32), end = "")
for i in range(k, n):
    print(s[i], end = "")
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
mod=1000000007

#+++++

def main():
	dd={'A':'a', 'B':'b', 'C':'c'}
	n, k = IN()
	s = input()
	
	ret=s[:k-1]+dd[s[k-1]]+s[k:]
	return ret
		
	
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def main():
    a, b = map(int, input().split())
    str = input()

    array = []

    for i in range(len(str)):
        if (i+1 == b):
            array.append(str[i].lower())
        else:
            array.append(str[i])

    str2 = ''.join(array)
    print(str2)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N,M = map(int,input().split())
S = str(input())
SA = list(S)
D = ["a" , "b" , "c"]

if SA[M-1] == "A":
    SA[M-1] = D[0]
elif SA[M-1] == "B":
    SA[M-1] = D[1]
elif SA[M-1] == "C":
    SA[M-1] = D[2]

M = ''.join(SA)

print(M)

Submission status: Accepted

Solution code:
N,K = [int(x) for x in 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()
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()

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n, k = map(int, input().split())
    ans = input()

    if n ==1:
        ans = ans.lower()
    elif n==2:
        if k == 1:
            ans = ans[0].lower() + ans[1]
        else:
            ans = ans[0]+ ans[1].lower()

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

    print(ans)

Submission status: Accepted

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

for i in range(N):
    if i==M-1:
        print(S[i].lower(),end="")
    else:
        print(S[i],end="")
print("")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 = list(input()) #文字列はそのままだとイミュータブル
s[k-1] = chr(ord(s[k-1]) + 32)
print("".join(s))

Submission status: Accepted

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

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(*S, sep="")

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

Submission status: Accepted

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

for i in range(65, 65+26):
    if S[K-1]==chr(i):
        S[K-1]=chr(i+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:
a, b = map(int, input().split())
s = input()
print(s[:b-1] + s[b-1].lower() + s[b:])

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:
# import bisect
# from collections import Counter, defaultdict, deque, namedtuple
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

n, k = input().split()
s = list(input())
k = int(k)
s[k - 1] = s[k - 1].lower()

print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(''.join(s))

Submission status: Accepted

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

# 文字列に対してk以前とｋ以降をそのまま表示。
# kのみstr.lower()を適用する
print(s[:k-1]+s[k-1].lower()+s[k:])

Submission status: Accepted

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

Submission status: Accepted

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

ans = ""

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

print(ans)

Submission status: Accepted

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

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

print("".join(s))

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
s=[i for i in 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"
for i in range(len(s)):
  print(s[i],end="")

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()
l=[]
for i in range(len(s)):
    l.append(s[i])
b = l[k-1].lower()
l[k-1] = b
print(''.join(l))

Submission status: Accepted

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


ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
abc = "abcdefghijklmnopqrstuvwxyz"

s = list(input())

s[k-1] = abc[ABC.find(s[k-1])]
  
print("".join(s))

Submission status: Accepted

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

s[k-1] = s[k-1].lower()
p = ""
for i in range(n):
  p += s[i]
print(p)

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"
else:
    S[K-1]="c"
print("".join(map(str,S)))

Submission status: Accepted

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

Submission status: Accepted

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

S1[K-1]=chr(int(ord(S1[K-1]))+32)

print(''.join(S1))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(''.join(S))

Submission status: Accepted

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


def solve(N: int, K: int, S: str):
    print(S[:K-1] + S[K-1].lower() + S[K:])
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(N, K, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

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(*s,sep="")

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:
import sys
input = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
l = list(str(input()))

for i in range(a):
  if i == b-1:
    print(l[i].lower(), end="")
  else:
    print(l[i], end="")

Submission status: Accepted

Solution code:
#126_A
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 = input().split()
S = input()
K = int(K)
li = list(S)
li[K-1] = chr(ord(S[K-1])+32)
print(''.join(li))

Submission status: Accepted

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

Submission status: Accepted

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

def komo(n):
  if n == "A":
    return "a"
  elif n == "B":
    return "b"
  else:
    return "c"
  
ans = S[:K-1] + komo(S[K-1]) + S[K:]

print(ans)

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
S = list(input())
s = S[K-1]
if s=='A':
    S[K-1] = 'a'
    print(''.join(S))
if s=='B':
    S[K-1] = 'b'
    print(''.join(S))
if s=='C':
    S[K-1] = 'c'
    print(''.join(S))

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:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

def main():
  n, k = map(int, input().strip().split())
  s = list(input().strip())
  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 = str(input())

ans = ''
for i, s in enumerate(S):
  if i == K-1:
    s = s.lower()
  ans += 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"
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:
def main():
    N, K = map(int, input().split())

    S = list(input())
    S[K - 1] = chr(ord(S[K - 1]) + ord('a') - ord('A'))

    print("".join(S))


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:
a, b = list(map(int,input().split()))
S = list(str(input()))
S[b-1] = str.lower(S[b-1])
S = "".join(map(str,S))
print(S)

Submission status: Accepted

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

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

print(''.join(s))

Submission status: Accepted

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

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

print(*s, sep='')

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
 
N, K = MAP()
S = input()
 
if S[K - 1] == "A":
  S = S[0:K - 1] + "a" + S[K:]
if S[K - 1] == "B":
  S = S[0:K - 1] + "b" + S[K:]
if S[K - 1] == "C":
  S = S[0:K - 1] + "c" + S[K:]

print(S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

line = input()
S = list(i for i in line)
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"
else:
    s[k-1] = "c"

print("".join(s))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
number = input().split(" ")
N = int(number[0])
K = int(number[1])
word = input()
words = []
for i in word:
	words.append(i)
if words[K-1] == "A":
	words[K-1] = "a"
elif words[K-1] == "B":
	words[K-1] = "b"
else:
	words[K-1] = "c"
for i in words:
	print(i,end="")

Submission status: Accepted

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

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

print()

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

# ABC126A
from copy import deepcopy
N, K = map(int, input().split())
S = input()

l = [s for s in S]
l[K-1] = l[K-1].lower()
print(''.join(l))

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())
if S[K-1] == 'A':
    S[K-1] = S[K-1].replace('A', 'a')
    print(''.join(S))
elif S[K-1] == 'B':
    S[K-1] = S[K-1].replace('B', 'b')
    print(''.join(S))
else:
    S[K-1] = S[K-1].replace('C', 'c')
    print(''.join(S))

Submission status: Accepted

Solution code:
import string

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

Submission status: Accepted

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

u = s.lower()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
n,k = i2()
s = l()
s[k-1] = s[k-1].lower()
for k in s:
    print(k,end="")

Submission status: Accepted

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

ans = ''
for i, s in enumerate(S):
  if i+1 == K:
    ans += str(S[i]).lower()
  else:
    ans += str(S[i])
print(ans)

Submission status: Accepted

Solution code:
n,k = list(map(int, input().split()))
s = input()
ls = list(s)
ans = []
for i in range(len(ls)):
    ls1 = ls[i]
    if i+1 == k:
        ls1 = ls1.lower()
    ans.append(ls1)
print("".join(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:
N,K = map(int,input().split())
S = input()

R = ""
count = 0
for s in S:
    if count != K-1:
        R += s
    else:
        R += s.lower()
    count += 1    
print(R)

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

Submission status: Accepted

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

n, k = [int(x) for x in input().split()]
s = input()
for i, l in enumerate(s):
    if i == k - 1:
        print(l.lower(), end='')
    else:
        print(l, end='')
print('')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
s=input()
j=0
ns=""
for i in s:
	if j==k-1:
		i=i.lower()
	j+=1
	ns+=i

print(ns)

Submission status: Accepted

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

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())
moji = input()
moji = list(moji)
moji[k-1] = moji[k-1].lower()
ans = ''.join(moji)
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 = [int(i) for i in input().rstrip().split()]
S = input()
s = S[K-1]
s = s.lower()
S = S[:K-1] + s + S[K:]
print(S)

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

#入力（後でいじる）
def pin(type=int):
    return map(type,input().split())
#どっかで最悪計算量の入力データを用意する関数を作ろう？

#solution:
def comp(p):#期待値
    return ((p+1)/2)
#潜 影 蛇 手 ! !
        
#input
N,k=pin()
S=input()
ans=""
for i in range(N):
    ans+=S[i] if i!=k-1 else chr(ord(S[i])+32)
print(ans)
#print(["NO","YES"][1-cond])

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
from string import ascii_lowercase, ascii_uppercase

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    N, K = MAP()
    S = INPUT()

    ans = ""
    for i in range(N):
        if i == K - 1:
            for j, a in enumerate(ascii_uppercase):
                if S[i] == a: ans += ascii_lowercase[j]
        else: ans += S[i]

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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(n):
    print(s[i],end = '')

Submission status: Accepted

Solution code:
NK = input()
S = input()

N = int(NK.split()[0])
K = int(NK.split()[1])

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

i = K-1
print(S[:i]+low+S[i+1:])

Submission status: Accepted

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

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

print(*s ,sep="")

Submission status: Accepted

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


def main():
    N, K = map(int, input().split())
    S = list(input())
    S[K - 1] = S[K - 1].lower()
    print(*S, sep='')


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'
else:
  s[k-1]='c'
print(''.join(s))

Submission status: Accepted

Solution code:
Input_num = input().split()
Input_cou = input()

num = int(Input_num[1])

print(Input_cou[:num-1] + Input_cou[num-1].lower() + Input_cou[num:])

Submission status: Accepted

Solution code:
nums = input().split()
N = int(nums[0])
K = int(nums[1])
S = input()

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

print(s)

Submission status: Accepted

Solution code:
import re
pat = r'[0-9]+'

Input_num = input()
Input_cou = input()

num_list = re.findall(pat, Input_num)
num = int(num_list[1])

print(Input_cou[:num-1] + Input_cou[num-1].lower() + Input_cou[num:])

Submission status: Accepted

Solution code:
nums = input().split()
N = int(nums[0])
K = int(nums[1])
S = input()
s1 = S[:K - 1]
s2 = S[K:]

if S[K - 1] == 'A':
    s = s1 + 'a' + s2

elif S[K - 1] == 'B':
    s = s1 + 'b' + s2

else:
    s = s1 + 'c' + s2

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

print(S[:K-1]+chr(ord(S[K-1])+32)+S[K:])

Submission status: Accepted

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

Submission status: Accepted

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

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

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] = chr(ord(S[i]) + 0x20)
    break
    
print(''.join(S))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = map(int, 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 = 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 = str(input())
K = K - 1
S = S[:K] + chr(ord(S[K]) ^ 32) + S[(K + 1):]
print(S)

Submission status: Accepted

Solution code:
N,K =map(int,input().split())
S=str(input())
h=S[K-1]
h=str.swapcase(h)
S=S[:K-1]+h+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()
print(s[:k - 1] + chr(ord(s[k - 1]) - ord('A') + ord('a')) + s[k:])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def resolve():
    import sys
    input = sys.stdin.readline
    
    N, K = map(int, input().split())
    S = input()
    res = S[:K-1] + S[K-1].lower() + S[K:]
    print(res)


if __name__ == "__main__":
    resolve()