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:
n1, n2 = [int(i) for i in input().split()]
s1 = input()
l1 = list(s1)
s2 = ""

for i1 in range(n1):
    if i1 == (n2 -1):
        l1[i1] = l1[i1] .lower()
    s2 +=l1[i1]

print(s2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

tmp = S_list[K-1]
S_list[K-1] = tmp.lower()

print(''.join(S_list))

Submission status: Accepted

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

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(s_list)
s_changed="".join(s_list)
print(s_changed)

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()
s_changed="".join(s_list)
print(s_changed)

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

S = list(input())

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

print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if mo == 'A':
    s.insert(k,'a')
elif mo == 'B':
    s.insert(k,'b')
else:
    s.insert(k,'c')

s= "".join(s)
print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import string
# stdin = open('./input.txt')

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

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

Submission status: Accepted

Solution code:
n, k = [int(v) for v in input().split()]
s = list(input())
s_k = s[k-1]
s[k-1] = chr(ord(s_k) - (ord('A') - ord('a')))
print("".join(s))

Submission status: Accepted

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

S_list=list(S)

ans=''
for i in range(len(S_list)):
	ans+=S_list[i].lower() if i==K-1 else S_list[i] 
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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


print(''.join([(s.lower() if i == (K-1) else s) for (i, s) in enumerate(S)]))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n, k = map(int, input().split(' '))
sss = input()

ans = []
for i, S in enumerate(sss):
    i += 1
    if i == k:
        s = S.lower()
        ans.append(s)
    else:
        ans.append(S)

print("".join(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = ""
cnt = 1
for i in S:
    if cnt == K:
        ans += i.lower()
    else:
        ans += i
    cnt += 1
        
print(ans)

Submission status: Accepted

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

list_s = list(s)
list_s[k - 1] = list_s[k-1].lower()
output = ''.join(list_s)

print(output)

Submission status: Accepted

Solution code:
n, m = [int(i) for i in input().split()]
#table = [[int(i) for i in input().split()] for m in range(m)]
#light = [int(i) for i in input().split()]
s = input()
list = list(s)

#print(n, m)
#print(table)
#print(light)

list[m-1] = list[m-1].lower()
s = ''.join(list)


print(s)

Submission status: Accepted

Solution code:
N, K = map(int, raw_input().split())
word = raw_input()
newword = ""
for i in xrange(N):
  if i == K - 1:
    if word[i] == "A":
      newword += "a"
    elif word[i] == "B":
      newword += "b"
    else:
      newword += "c"
  else:
    newword += word[i]
    
print newword

Submission status: Accepted

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

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

print("".join(s))

Submission status: Accepted

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

print(T)

Submission status: Accepted

Solution code:
N , K = map(int,input().split())
str_t = list(input())
ans =''
K = K-1
for i in range(len(str_t)):
    if i == K:
        ans += str_t[i].lower()
    else:
        ans += str_t[i].upper()
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
in_1 = input().split(" ")

n = int(in_1[0])
k = int(in_1[1])
s = input()
arr = []
for i in range(n):
  arr.append(s[i])


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

s = ""
for i in range(n):
  s = s+arr[i]

print(s)

Submission status: Accepted

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


def solve(N: int, K:int, S:str):
    for i, s in enumerate(S):
        if i == K-1:
            print(s.lower(), end="")
        else:
            print(s, end="")
    print("")
    return


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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
letters = list(input())
l = letters[k-1]
if l == "A":
  l = "a"
elif l == "B":
  l = "b"
elif l == "C":
  l = "c"
letters[k-1] = l  
for letter in letters:
  print(letter, end="")

Submission status: Accepted

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

s=str(input())

print(s[0:k-1],end='')
print(s[k-1].lower(),end='')
print(s[k:],end='')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from __future__ import print_function
# import numpy as np
# import numpypy as np
import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd
def lcm(n,m):
    return int(n*m/gcd(n,m))

import re
import array
import copy
import functools
import operator

import collections
import itertools
import bisect
import heapq


from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace

from queue import PriorityQueue as pq

# from itertools import accumulate
# from collections import deque
import random


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

if isinstance(N,int)==1 and isinstance(K,int)==1 \
   and 1<=N<=50 and 1<=K<=N :

    S=input()
    null_char=S.replace('A','').replace('B','').replace('C','')

    if len(S)==N and S.isupper()==1 and not null_char:
        small_S=S[K-1:K].lower()
        print(S[:K-1] + small_S + S[K:])

    else :
        print("Unexpected parameter S")
        exit()

else :
    print("Unexpected parameter N or K")
    exit()

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

x=ord(s[k-1])
s[k-1]=chr(x+32)
y=''.join((x) for x in s)
print(y)

Submission status: Accepted

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

Submission status: Accepted

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

ans = S[:K-1] + S[K-1].replace('A','a').replace('B','b').replace('C','c') + S[K:]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[N, K] = map(int, input().split())
t = input()
print("{}{}{}".format(t[:K-1], t[K-1:K].lower(), t[K:]))

Submission status: Accepted

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

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

print(S)

Submission status: Accepted

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

Submission status: Accepted

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

ans = []
for i in range(n):
    ans.append(s[i])
    
ans[k-1] = ans[k-1].lower()
print("".join(ans))

Submission status: Accepted

Solution code:
N, K = [int(x) for x in input().split()]
S = list(input().strip())
l = {'A':'a', 'B':'b', 'C':'c'}
S[K-1] = l[S[K-1]]
print("".join(S))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

k -= 1
l = list(s)
l[k] = l[k].lower()
s = "".join(l)

print(s)

Submission status: Accepted

Solution code:
n, k = [ int(v) for v 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()
SS=""
for i,s in enumerate(S):
    if i==K-1:
        if s=="A":
            s="a"
        if s=="B":
            s="b"
        if s=="C":
            s="c"
    SS+=s
print(SS)

Submission status: Accepted

Solution code:
NK = input().split()
N = int(NK[0])
K = int(NK[1])
S = input()
K = K - 1
S = list(S)
for i in range(N):
  if i == K:
    S[i] = S[K].swapcase()
s = ''.join(S)
print(s)

Submission status: Accepted

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

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

ans = ''

for i, s in enumerate(S):
    if i != (K - 1):
        ans += s
    else:
        ans += convert_dict[s]

print(ans)

Submission status: Accepted

Solution code:

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

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

ans = S[:K-1]

if S[K-1] =="A":
    ans += "a"

if S[K-1] =="B":
    ans += "b"

if S[K-1] =="C":
    ans += "c"

ans += S[K:]


print (ans)

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

Submission status: Accepted

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

print(ans)

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.append(S[i].lower())
    else:
        ans.append(S[i])
print(''.join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=input().split()
s=input()
k=int(k)-1
for i,c in enumerate(s):
	if i==k:c=chr(ord(c)+32)
	print(c,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()
ans = S[:K-1] + chr(ord(S[K-1]) + 32) + S[K:]
print(ans)

Submission status: Accepted

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

lst = list(s)
lst[K-1] = str.lower(lst[K-1])
print(''.join(lst))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
# gcd
from fractions import gcd
# 切り上げ，切り捨て
# from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
# from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
# import math
# from functools import reduce
#
# input関係の定義
# fin = open('in_1.txt', 'r')
# sys.stdin = fin
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = list(next(tokens))  # type: str

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import re
import bisect
from datetime import datetime as dt
n, k = map(int, input().split())
s = input()
ans = ''
for i in range(n):
    if i == k - 1:
        ans += s[i].lower()
    else:
        ans += s[i]
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
# gcd
from fractions import gcd
# 切り上げ，切り捨て
# from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
# from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
# import math
# from functools import reduce
#
# input関係の定義
# import os
# fin = open('in_2.txt', 'r')
# sys.stdin = fin
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    # tokens = iterate_tokens()
    # N = int(next(tokens))  # type: int
    # K = int(next(tokens))  # type: int
    # S = next(tokens)  # type: str
    N, K = mi()
    S = li()

    # write code
    A = list(S)
    A[K-1] = A[K-1].lower()
    print(''.join(A))

Submission status: Accepted

Solution code:
import sys
# gcd
from fractions import gcd
# 切り上げ，切り捨て
# from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
# from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
# import math
# from functools import reduce
#
# input関係の定義
# import os
# fin = open('in_2.txt', 'r')
# sys.stdin = fin
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str

    # write code
    A = list(S)
    A[K-1] = A[K-1].lower()
    print(''.join(A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

s = input()
s = list(s)

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

ans = ""

for i in range(n):
  ans+=s[i];
 
print(ans)

Submission status: Accepted

Solution code:
m=input().split()
N=int(m[0])
K=int(m[1])
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"

SS=""
for i in range(N): 
  SS+=S[i]

print(SS)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import copy
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right
# import numpy as np

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

############
############
############

N, K = l_inpl()
S = input()

ans = ""
for i in range(N):
    s = S[i]
    if i == K-1:
        s = s.lower()
    ans = 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'
elif s[k-1]=='B':
    s[k-1]='b'
else:
    s[k-1]='c'
ans=''
for i in range(n):
    ans+=s[i]
print(ans)

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
S=str(input())
a=S[K-1].swapcase()
ans=''
for i in range(0,N):
    if(i==K-1):
        ans+=a
    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"
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()

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

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

print(S)

Submission status: Accepted

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

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:
#coding: utf-8
#a, b = map(int, input().split())
#a, b, c, x = map(int, [input() for i in range(4)])

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:]
elif S[b - 1] == "C":
    S = S[:b - 1] + "c" + S[b:]
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=list(input())
for i in range(n):
        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):
			S[i] = S[i].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()
_S = S[0]
if len(S)>1:
    for v in range(1, N):
        _S += S[v]
    print(_S)
else :
    print(_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:
n, k = map(int, input().split())
s = input()

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

print(''.join(st))

Submission status: Accepted

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

N=list(input())

N[b-1] = N[b-1].lower();

print("".join(N))

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
S = input()
p = S[k-1]
if p == 'A':
  print(S[:k-1]+'a'+S[k:])
elif p == '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(" "))
str=input()
strl=list(str)
strl[k-1]=strl[k-1].lower()
print("".join(strl))

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:
A,B = map(int,input().split())
ans = ""
S = input()
for i,s in enumerate(S):
    if i == B - 1:
        ans += s.lower()
    else:
        ans += s
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,K = (int(x) for x in 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:
def get_s(w, e):
    s = w + 1
    if s == k:
        if e == "A":
            return "a"
        elif e == "B":
            return "b"
        else:
            return "c"
    else:
        return e


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

k = i[1]


a = list(input())


ab = 0

while ab < i[0]:

    a[ab] = get_s(ab, a[ab])
    ab += 1

p = ""


for d in range(i[0]):
    p += a[d]
 
print(p)

Submission status: Accepted

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

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()
C = [c.lower() if i == K-1 else c for i, c in enumerate(S)]
print(''.join(C))

Submission status: Accepted

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

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

print(S)

Submission status: Accepted

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

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

for i in range(n):
  print(s[i], end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k = map(int, input().split())
s_list = [s for s in input()]
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()
s = ""
for i in range(N):
    if i == K - 1:
        if S[i] == "A":
            s += "a"

        elif S[i] == "B":
            s += "b"

        else:
            s += "c"

    else:
        s += S[i]

print(s)

Submission status: Accepted

Solution code:
length_and_index = list(map(int,input().split(' ')))
input_str = list(input()[:length_and_index[0]])
input_str[length_and_index[1]-1] = chr(ord(input_str[length_and_index[1]-1])+32)
out = "".join(str(x) for x in input_str)
print(out)