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

Solution (Python):

"""                         
Beautiful is better than ugly.
    Explicit is better than implicit.
Simple is better than complex.
    Complex is better than complicated.
Flat is better than nested.
    Sparse is better than dense.
                    
    * Readability counts *

 // Author : raj1307 - Raj Singh
 // Date   : 19.05.19

"""

from __future__ import division, print_function
import os,sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
else:
    _str = str
    str = lambda x=b"": x if type(x) is bytes else _str(x).encode()

def ii(): return int(input())
def si(): return input()
def mi(): return map(int,input().strip().split(" "))
def li(): return list(mi())

def dmain():
    sys.setrecursionlimit(100000000)
    threading.stack_size(40960000)
    thread = threading.Thread(target=main)
    thread.start()
    






abc='abcdefghijklmnopqrstuvwxyz'
abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod,MOD=1000000007,998244353
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]
def getKey(item): return item[0] 
def sort2(l):return sorted(l, key=getKey)
def d2(n,m,num):return [[num for x in range(m)] for y in range(n)]
def isPowerOfTwo (x): return (x and (not(x & (x - 1))) )
def decimalToBinary(n): return bin(n).replace("0b","")
def ntl(n):return [int(i) for i in str(n)]

def powerMod(x,y,p):
    res = 1
    x %= p
    while y > 0:
        if y&1:
            res = (res*x)%p
        y = y>>1
        x = (x*x)%p1
    return res

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x
    
def isPrime(n) : 
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
    return True




  



def main():
    
    
    n,m=mi()
    s=si()
    for i in range(n):
        if i==m-1:
            print(s[i].lower(),end='')
        else:
            print(s[i],end='')
    






BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        if self.buffer.tell():
            return self.buffer.read()
        return os.read(self._fd, os.fstat(self._fd).st_size)

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", b" "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", b"\n"))
    if kwargs.pop("flush", False):
        file.flush()


sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip(b"\r\n")



if __name__ == "__main__":
    main()

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

if s[K - 1] == 'A':
    t = 'a'
elif s[K - 1] == 'B':
    t = 'b'
else:
    t = 'c'

print(s[:K - 1] + t + s[K:])

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

Solution (Python):










import sys


def get_array(): return list(map(int, sys.stdin.readline().split()))


def get_ints(): return map(int, sys.stdin.readline().split())


def input(): return sys.stdin.readline().strip()


def main():
    n, k = get_ints()
    s = list(input())
    s[k - 1] = s[k - 1].lower()
    print(*s, sep='')


if __name__ == "__main__":
    main()

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

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

Solution (Python):
def main():
    _, K = map(int, input().split())
    S = input()
    print(S[:K - 1] + S[K - 1].lower() + S[K:])


main()

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

st = list(input())

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

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

Solution (Python):
n, k = (int(i) for i in input().split())
s = input()
k = k-1
print(s[:k] + s[k].lower() + s[k+1:])

Solution (Python):
p = input().split()
s = list(input())
s[int(p[1])-1] = s[int(p[1])-1].lower()
print("".join(s))

Solution (Python):
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)

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

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

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

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

print(''.join(S))

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

def LI(): return list(map(int,input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()

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

main()

Solution (Python):
A, B = map(int, input().split())
S = input()
print(S[:B-1] + S[B-1].lower() + S[B:])

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

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

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

Solution (Python):
n, k = list(map(int, input().split(" ")))
s = input()
str_list = list(s)


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


str_changed = "".join(str_list)
print(str_changed)

Solution (Python):
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))

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

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

Solution (Python):
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)

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

Solution (Python):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

N,K = inpl()
K -= 1
S = list(input())

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

Solution (Python):
_, k = (int(z) for z in input().split())
s = input()
j = k - 1
print(s[:j] + s[j].lower() + s[j + 1:])

Solution (Python):
n,k=map(int, input().split())
k -= 1
s = [i for i in input()]

if s[k] == 'A':
    s[k] = 'a'
if s[k] == 'B':
    s[k] = 'b'
if s[k] == 'C':
    s[k] = 'c'

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

print()

Solution (Python):

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

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

Solution (Python):
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)

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

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

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

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

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

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

Solution (Python):
from sys import stdin

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

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

input = lambda: stdin.readline().rstrip()
main()

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

Solution (Python):

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

ans = ""
for idx,c in enumerate(S):
    if idx+1 == K:
        ans = ans + c.lower()
    else:
        ans = ans + c
print(ans)

Solution (Python):
sp = input().split()
li = list(map(int,sp))
n,m = li
a = list(input())
a[m-1] = a[m-1].lower()
print("".join(a))

Solution (Python):
n, k = list(map(int, input().split(' ')))
s = list(input().strip())

s[k-1] = chr(ord(s[k-1]) - ord('A') + ord('a'))
print("".join(s))

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

c = ord(S[K-1])
S = list(S)
S[K-1] = chr(c-ord('A')+ord('a'))
S = ''.join(S)
print(S)

Solution (Python):

def read_input():
    n, k = map(int, input().split())
    s = input()
    slist = list(s)
    return n, k, slist


def submit():
    n, k, slist = read_input()
    slist[k-1] = slist[k-1].lower()
    print(''.join(slist))
    return


if __name__ == '__main__':
    submit()

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

Solution (Python):


from math import *



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

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

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

Solution (Python):
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

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

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

out = ""

for i in range(n):
    out += str(s[i])
print(out)

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

Solution (Python):
n,k = map(int,input().split())
s = list(input())
if(s[k-1]=='A'):
    s[k-1]='a'
    print(''.join(s))
if(s[k-1]=='B'):
    s[k-1]='b'
    print(''.join(s))
if(s[k-1]=='C'):
    s[k-1]='c'
    print(''.join(s))

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

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

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

Solution (Python):

import sys


def solve(N: int, K: int, S: str):
    S_list = list(S)
    S_list[K-1] = S_list[K-1].lower()
    S = ''.join(S_list)
    print(S)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    S = next(tokens)  
    solve(N, K, S)

if __name__ == '__main__':
    main()

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

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

S=input()

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

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

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

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

print(S)

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

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

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

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

Solution (Python):
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))

Solution (Python):
al = 'abcdefghijklmnopqrstuvwxyz'
AL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
a, b = map(int,input().split())
s = input()
ans = ''
for i in range(a):
    if i == b-1:
        ans += al[AL.index(s[i])]
    else:
        ans += s[i]
print(ans)

Solution (Python):
def changing_a_character(N: int, K: int, S: str)->str:
    return ''.join(c.lower() if i == K-1 else c for i, c in enumerate(S))


if __name__ == "__main__":
    N, K = map(int, input().split())
    S = input()

    ans = changing_a_character(N, K, S)
    print(ans)

Solution (Python):
n, k = map(int, input().split())
s = input()
for i in range(n):
    if i == k - 1:
        print(chr(ord(s[i]) - (ord("A") - ord("a")) ), end = "")
    else:
        print(s[i], end = "")
print()

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

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

Solution (Python):
n,k=map(int,input().split())
s=list(input())
ts=s[k-1]
if ts=='A':
  ts='a'
elif ts=='B':
  ts='b'
elif ts=='C':
  ts='c'
s[k-1]=ts
print(''.join(map(str,s)))

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10**7)

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)

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

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

Solution (Python):
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'
res = ''
for e in s:
    res += e
print(res)

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

Solution (Python):


import math
import string


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

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

Solution (Python):




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

  print(s)


if __name__ == '__main__':
  main()

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

Solution (Python):
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):
    if i != n-1:
        print(s[i],end="")
    else:
        print(s[i])

Solution (Python):
small = {'A': 'a', 'B': 'b', 'C': 'c'}
n, k = map(int, input().split())
s = list(input())

s[k-1] = small[s[k-1]]
print(''.join(s))

Solution (Python):


import sys
import math

import array
import bisect
import collections
from collections import Counter, defaultdict
import fractions
import heapq
import re

sys.setrecursionlimit(1000000)


def array2d(dim1, dim2, init=None):
    return [[init for _ in range(dim2)] for _ in range(dim1)]

def argsort(l, reverse=False):
    return sorted(range(len(l)), key=lambda i: l[i], reverse=reverse)

def argmin(l):
    return l.index(min(l))

def YESNO(ans, yes="YES", no="NO"):
    print([no, yes][ans])

II = lambda: int(input())
MI = lambda: map(int, input().split())
MIL = lambda: list(MI())
MIS = lambda: input().split()


def main():
    n, k = MI()
    s = ""
    for n, c in enumerate(input()):
        s += c.lower() if n == k-1 else c
    return s


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

Solution (Python):


N, K = map(int, input().split())
S = input()
l = list(S)
l[K-1] = l[K-1].lower()
R = "".join(l)

print(R)

Solution (Python):

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

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

Solution (Python):
n,m = map(int,input().split())
m -= 1
s = str(input())
S = []
for i in range(n):
    if i == m:
        S.append(s[i].lower())
    else:
        S.append(s[i])
print("".join(S))

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

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    n,k = LI()
    s = input()
    for i in range(k-1):
        print(s[i],end = "")
    print(s[k-1].lower(),end = "")
    for i in range(k,n):
        print(s[i],end = "")
    print()
    return


def B():
    n = I()

    return


def C():
    n = I()

    return


def D():
    n = I()

    return


def E():
    n = I()

    return


def F():
    n = I()

    return


if __name__ == "__main__":
    A()

Solution (Python):
l1 = list(map(int,input().split(" ")))
S = input()
temp = list(S)
temp[l1[1]-1] = temp[l1[1]-1].lower()
print( "".join(temp))

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

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

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

Solution (Python):
N, M = map(int, input().split())
S = input()
s = S.lower()

print(S[:M - 1] + s[M - 1] + S[M:])

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

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

print(s)

Solution (Python):
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))

Solution (Python):
_, N = list(map(int, input().split(" ")))
s = input()
s = s[:N - 1] + s[N - 1].lower() + s[N:]
print(s)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    N, K = map(int, input().split())
    S = str(input().strip())

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

    return ans


if __name__ == '__main__':
    print(main())

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

Solution (Python):



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

    for i, si in enumerate(s):
        if i == k - 1:
            ans += si.lower()
        else:
            ans += si

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):

def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
n,k=IL()
s=input()
print(s[:k-1]+s[k-1].lower()+s[k:])

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

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

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

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

print("".join(S))

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

Solution (Python):
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)

Solution (Python):
import sys

inf = 10 ** 18

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

for i, Si in enumerate(list(S)):
    if i + 1 == K:
        S[i] = Si.lower()

print(''.join(S))

Solution (Python):
N,k=map(int,input().split())
S=[s for s in 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))

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

Solution (Python):
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="")

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

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

print("".join(listS))

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

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

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

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

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

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

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

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

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

print(*S, sep='')

Solution (Python):

import sys


def solve(N: int, K: int, S: str):
    ret = ''
    for i, c in enumerate(S):
        if i + 1 == K:
            ret += c.lower()
        else:
            ret += c
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    S = next(tokens)  
    solve(N, K, S)

if __name__ == '__main__':
    main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

S = list(S)

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

print("".join(S))

Solution (Python):

import sys
from collections.abc import Iterable
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(N: int, K: int, S: str):
    s = list(S)
    s[K-1] = {"A": "a", "B": "b", "C": "c"}[s[K-1]]
    return ''.join(s)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    K = int(next(tokens))  
    S = next(tokens)  
    result = solve(N, K, S)
    if isinstance(result, Iterable) and not isinstance(result, str):
        result = '\n'.join([str(v) for v in result])
    print(result)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]





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

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

Solution (Python):
N, K = list(map(int, input().split()))
for idx,c in enumerate(input()):
  if idx == K -1:
    print(c.lower(), end='')
  else:
    print(c, end='')
print()

Solution (Python):
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'
    
res = ''
for i in range(N):
    res += S[i]

print(res)

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

print(''.join(s))

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

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

Solution (Python):
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

sys.setrecursionlimit(10000)
INF = float('inf')

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

S = list(input())

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

Solution (Python):
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)

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

Solution (Python):
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))

Solution (Python):


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

S = list(input())

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

print(''.join(S))

Solution (Python):


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

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

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

print("".join(s))

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

Solution (Python):
if __name__ == "__main__":
    N, K = tuple(map(int, input().split(" ")))
    S = input()
    print(S[:K-1] + S[K-1].lower() + S[K:])

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

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

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

Solution (Python):
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))

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

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

Solution (Python):
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)

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

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

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

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

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

Solution (Python):

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


S = list(str(input()))
L = len(S)


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

Solution (Python):
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)

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

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

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