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

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N, K = LI()
S = list(S())

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):
import sys
input = sys.stdin.readline
def main():
    N, K = map(int, input().split())
    S = list(input().rstrip())
    S[K-1] = S[K-1].lower()
    print("".join(S))

if __name__ == '__main__':
    main()

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

"""
Created on Wed May 13 12:28:04 2020

@author: shinba
"""


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()
sl = []
for i in range(len(s)):
    sl.append(s[i])

Al = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
al = 'abcdefghijklmnopqrstuvwxyz'

for i in range(len(Al)):
    if sl[k-1] == Al[i]:
        sl[k-1] = (al[i])


print(''.join(sl))

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):
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):
import sys
import math
import bisect

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

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

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

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

print(*S,sep='')

Solution (Python):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def lcm(a, b):
    return a * b // gcd (a, b)





N,K =  inputIL()
S = list(input())


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


print("".join(S))

Solution (Python):
import sys
import math
sys.setrecursionlimit(10**6)
from collections import defaultdict

n,k=map(int,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 = 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()

K -= 1

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

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

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

print(*S, sep="")

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):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


n, k = Is()
s = LS()
s[k-1] = s[k-1].lower()
print("".join(s))

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

    print(S)


if __name__ == '__main__':

    ABC_126_A()

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

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

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

Solution (Python):
from sys import setrecursionlimit, exit
setrecursionlimit(1000000000)

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

main()

Solution (Python):


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

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

Solution (Python):
N,K=map(int,input().split())
S=input()
s=S[:K-1]
s+=S[K-1].swapcase()
s+=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 = input()

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

s = s[:k-1] + t + 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())
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=list(str(input()))

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

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

Solution (Python):
n,k=map(int,input().split())
s=input()
ans=""
for i in range(n):
    a=s[i]
    if i+1==k:
        a=a.swapcase()
    ans+=a
print(ans)

Solution (Python):

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

Solution (Python):
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 = list(input())
S[K-1] = S[K-1].lower()
print(''.join(S))

Solution (Python):



N, K = map(int, input().split())
S = [s for s in 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] = chr(ord(s[k - 1]) + 32)
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):
def changing_character(n, k, s):

    s[k-1] = s[k-1].lower()
    return "".join(s)
def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    print(changing_character(n, k, s))

if __name__ == '__main__':
    main()

Solution (Python):


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

Solution (Python):


def main():
    _, K = map(int, input().split(' '))
    S = input()

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
n,k = map(int,input().split())
s = list(input())
s[k-1] = s[k-1].swapcase()
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()
ret = ""
for i,s in enumerate(S):
    if i+1==K:
        ret += str.lower(s)
    else:
        ret += s
print(ret)

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

k -= 1

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

Solution (Python):
n,k = map(int,input().split())
s = list(str(input()))
s[k-1] = str.lower(s[k-1])
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 = list(input())
s[k-1] = s[k-1].lower()

print(''.join(s))

Solution (Python):
stdin = open(0).read().split('\n')
N, K = map(int,stdin[0].split())
S = stdin[1]
l=list(S)
l[K-1]=l[K-1].lower()
print("".join(l))

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'

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

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

for i in range(n):
  if i != k:
    print(s[i], end="")
  else:
    if s[k] == "A":
      print("a", end="")
    elif s[k] == "B":
      print("b", end="")
    elif s[k] == "C":
      print("c", end="")

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()
cnt = 0
ans = ""

for i in S:
    if cnt == K-1:
        ans += i.swapcase()
    else:
        ans += i
    cnt += 1

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())
S[k-1]= S[k-1].lower()
print("".join(S))

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

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 = 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 =str(input())
ans = []
for i in range(n):
    if i == k-1:
        ans.append(s[i].lower())
        
    else:
        ans.append(s[i])

print(''.join(ans))

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 accumulate, permutations, combinations, product, groupby
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
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, 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, groupby
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

print(S[:K-1], end="")
print(chr(ord(S[K-1])+32), end="")
print(S[K:])

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

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

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

Solution (Python):
n,k=map(int,input().split())
s=input()
t=s.lower()
u=[]
for i in range(len(s)):
    if i==(k-1):
        u.append(t[i])
    else:
        u.append(s[i])
print(*u,sep='')

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

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

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 

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

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())
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()
for i in range(0, k-1):
    print(s[i], end="")
print(str.swapcase(s[k-1]), end="")
for i in range(k, n):
    print(s[i], end="")

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

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

print(''.join(S))

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

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

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

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

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

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

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

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

Solution (Python):

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

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

Solution (Python):
N,K = map(int,input().split())
a = input()
res = ''
S = [el for el in a]
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 el in S:
  res += el
print(res)

Solution (Python):
N, K = map(int, input().split())
S = input()
t = ''
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()
moji = s[k - 1]
mojia = moji.lower()
res = ""
for i, word in enumerate(s):

    if i == k - 1:
        res = res + mojia
        continue
    res = res + word

print(res)

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

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

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

Solution (Python):
n,k = [int(i) for i in input().split()]
s = input()
for i, j in enumerate(s):
    if i + 1 == k:
        print(j.lower(),end="")
    else:
        print(j, end="")

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

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

Solution (Python):
num_str = input().split(" ")
S = input()

N = int(num_str[0])
K = int(num_str[1])
s = list(S)

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

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

Solution (Python):

n,k = map(int,input().split())
s = input()
cnt = 0
ans = []
for i in s:
  cnt += 1

  if cnt == k:
    ans.append(i.lower())
  else:
    ans.append(i)
print("".join(ans))

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

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


if __name__ == '__main__':
    q1()

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

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

if 2<=k<n:
  print(s[:k-1] + chr(ord(s[k-1])+32) + s[k:n])
elif k==1:
  print(chr(ord(s[0])+32) + s[1:n])
else:
  print(s[:n-1] + chr(ord(s[n-1])+32))

Solution (Python):
n,k=map(int,input().split())
s=input()
t="D"
for i in range(0,n):
  if k==1 and i==0:
    if s[k-1]=="A":
      t="a"
    if s[k-1]=="B":
      t="b"
    if s[k-1]=="C":
      t="c"
    moji = t
    continue
  elif i==k-1:
    if s[k-1]=="A":
      t="a"
    if s[k-1]=="B":
      t="b"
    if s[k-1]=="C":
      t="c"
    moji += t
  elif i==0:
    moji=s[0]
    continue
  else:
    moji += s[i]
  
print(moji)

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(x) for x in input().split()]
s_list = list(input())
s_list[k - 1] = s_list[k - 1].lower()
print("".join(s_list))

Solution (Python):
x = input().split()
s = input()
n = int(x[0])
k = int(x[1]) - 1
S = ''
for i in  range(0, n):
  if i == k:
    S += s[i].lower()
  else:
    S += s[i]
print(S)

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 = map(int,input().split())
S = input()
ans = S
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.lower()[k-1] + 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):
import sys

N, K = map(int, 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())

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

ANS = "".join(S)
print(ANS)

Solution (Python):


import sys



















def main():
    mod = 1000000007                  
    inf = float('inf')
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():  return int(input())
    def mi():  return map(int, input().split())
    def mi_0(): return map(lambda x: int(x)-1, input().split())
    def lmi(): return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():  return list(input())
    
    
    n, k = mi()
    s = input()
    print(s[:(k-1)] + s[k-1].lower() + s[k:])

if __name__ == "__main__":
    main()

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

Solution (Python):
n, k = map(int, input().split())
s = list(input())
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b = "abcdefghijklmnopqrstuvwxyz"
for i in range(26):
    if s[k - 1] == a[i]:
        s[k - 1] = b[i]
        break
print(*s, sep="")

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'
  
ans = ''
for i in range(len(S)):
  ans += S[i]
  
print(ans)

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())
s[k-1] = str.lower(s[k-1])

print(''.join(s))

Solution (Python):
param = list(map(int, input().split()))
n = param[0]
k = param[1]
s = input()

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

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

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

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

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

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

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()
if s[k-1]=='A':
  x='a'
elif s[k-1]=='B':
  x='b'
elif s[k-1]=='C':
  x='c'
print(s[:k-1]+x+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()

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

    n,k = map(int, input().split())
    s = list(input().rstrip())
    res = ''
    for i in range(n):
        if i == k-1:
            res += s[i].lower()
        else:
            res += s[i]
    print(res)


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 = input()
s = S[K - 1]
S = list(S)
S[K - 1] = str.lower(s)
S = "".join(S)
 
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 = [int(x) for x in input().split()]

S = list(input())

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

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

Solution (Python):
n,k=map(int,input().split())
a=list(str(input()))
a[k-1]=chr(ord(a[k-1])+32)

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

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

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

s = input()

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

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=str(input())
strings="A","B","C"
S=S[:K-1]+S[K-1].lower()+S[K:]
print(str(S))

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

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

ans=s[:k-1]+x+s[k:]
print(ans)

Solution (Python):
n, k = map(int, input().split())
s = input()
tmp = ord(s[k-1])
tmp1 = (chr(tmp+32))
ans = []

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

print("".join(map(str, ans)))

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

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(str(input()))
ans = []

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


print(''.join(ans))

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

s_li = [let for let in s]
s_li[k - 1] = s_li[k - 1].lower()

print(''.join(s_li))

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()
S = list(S)
S[K-1] = S[K-1].lower()

print(''.join(S))

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

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

print(ans)

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

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

Solution (Python):
n, k = map(int, input().split())
s = input()
tmp = chr(ord(s[k - 1]) + 32)
print(s[: k - 1] + tmp + 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):
n,k = map(int,input().split())
s = input()
ans = ""

for i in range(0,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().strip())
S[k-1] = S[k-1].lower()
print(*S, sep='')

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

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

print(ans)

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

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

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

print(ans)

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()
s_1 = s[k-1]
s_low = s_1.lower()
s_new = [i for i in s]
s_new[k-1] = s_low

print("".join(s_new))

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()
x = ''
for i, s in enumerate(S):
  if i == K-1:
    s = s.lower()
  x += s
    
print(x)

Solution (Python):
N,K=map(int,input().split())
S=input()
l=[]
for i in range(N):
    l.append(S[i])
l[K-1]=l[K-1].lower()
print("".join(l))

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

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

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

Solution (Python):
Big=["A","B","C"]
Small=["a","b","c"]

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

for i in range(3):
  if S[K-1]==Big[i]:
    S[K-1]=Small[i]

print("".join(S))

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