Problem:


Score : 100 points

Problem Statement

You are given a string S of length N consisting of A, B and C, and an integer K which is between 1 and N (inclusive).
Print the string S after lowercasing the K-th character in it.

Constraints

1 ≤ N ≤ 50

1 ≤ K ≤ N

S is a string of length N consisting of A, B and C.

Input

Input is given from Standard Input in the following format:

N K
S

Output

Print the string S after lowercasing the K-th character in it.

Sample Input 1

3 1
ABC

Sample Output 1

aBC

Sample Input 2

4 3
CABA

Sample Output 2

CAbA



Sample input:
3 1
ABC


Sample output:
aBC

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n, k = map(int, input().split())
    s = list(str(input()))
    s[k - 1] = s[k - 1].lower()
    w = ''
    for i in s:
        w = w + i
    print(w)
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=map(int, input("").split(' '))
assert n>=k>=1
assert 1<=n<=50

s=input('')
assert ("a","b","c" in s)

z=list((s))
z[k-1]=z[k-1].swapcase()

for i in z:
    print(i, end='')

Submission status: Accepted

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



d=a-b+1
c = list(c)
d = c[b-1]
c[b-1] = d.lower()

c = "".join(c)
print(c)

Submission status: Accepted

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

S= input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nk = input().split()
index = int(nk[1]) -1
s = input()
c = 0
for i in s:
  if c == index: print(i.lower(),end="")
  else: print(i,end="")
  c+= 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:
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
mod = 10**9 + 7

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

Submission status: Accepted

Solution code:
X=input()
X=X.split()
str=input()
ans=int(X[1])-1
exact=str[ans].lower()
before=str[0:ans]
after=str[ans+1:]
print(before+exact+after)

Submission status: Accepted

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

s[k-1] = chr(ord(s[k-1]) - ord('A') + ord('a'))
for c in s:
	print(c, end="")

Submission status: Accepted

Solution code:
# 126 A

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,k = (int(x) for x in input().split())
S = list(input())
if S[k-1] == "A":
  S[k-1] = "a"
elif S[k-1] == "B":
  S[k-1] = "b"
else:
  S[k-1] = "c"
print("".join(S))

Submission status: Accepted

Solution code:
n, k = input().split()
a = int(n)
b = int(k)
s = input()
result = ''
for i in range(a):
    if i == b-1:
        result += chr(ord(s[i]) + 32)
    else:
        result += s[i]
print(result)

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())
string = str(input())
arr = list(string)
arr[k-1] = arr[k-1].lower()
print(*arr, sep="")

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

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:
import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
N,K = [res[i] for i in (0,1)]
S=sys.stdin.readline(N)
K-=1
if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z)

Submission status: Accepted

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


print(ans)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


def main():
    N, K = map(int, readline().split())
    K -= 1
    S = readline().strip()
    
    S = list(S)
    S[K] = S[K].lower()
    print(''.join(S))
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
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 = M()
s = S()
ans = ''
for i in range(1, n+1):
    c = s[i-1]
    if i == k:
        c = c.lower()
    ans += c
print(ans)

Submission status: Accepted

Solution code:
x,y = [int(x) for x in input().split()]
z = input()
print(z[:y-1]+z[y-1].lower() + z[y:])

Submission status: Accepted

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

s[k-1] = s[k-1].lower()
print(*s, sep='')

Submission status: Accepted

Solution code:
N = input()
S = input()
N += "."
f = N.find(" ")
N1 =((N[0:f]))
K =(N[f+1:-1])
N1= int(N1)
S = S[0:N1+1]
S += "."
K= int(K)-1
s = (S[K:K+1])
s= s.lower()
print(S[0:K]+s+S[K+1:-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:
cases  = [int(i) for i in input().split() if i.isdigit()]
w = input()
print(w[0:cases[1]-1] + w[cases[1]-1].lower() + w[cases[1]:])

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=[int(x) for x in input().rstrip().split()]
s=[i for i in input()]
ans=""
s[k-1]=s[k-1].lower()
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()
print(''.join(s))

Submission status: Accepted

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

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

for i in range(N):
    print(S[i],end="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,X=map(int,input().split())
arr=list(map(str,input()))

arr[X-1]=arr[X-1].lower()


print("".join(arr))

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    n, k = geta(int)
    s = gete()

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n, k = map(int, input().split())
    s = list(input()[:-1].decode())
    s[k - 1] = s[k - 1].lower()
    print(*s, sep='')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s)) #"".join()にてリストを文字列に変換できる

Submission status: Accepted

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

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

print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(new)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def ip():return int(input())
def inp():return map(int,input().split())
def linp():return list(map(int,input().split()))

n,k=inp()
s=[x for x in input()]
s[k-1]=chr(ord(s[k-1])+32)
for x in s:print(x,end="")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=[int(x) for x in input().split()]
s=input()
 
ans=s[:k-1]+s[k-1].lower()+s[k:]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = str(input())
K -= 1
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].swapcase()
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()
if s[k-1]=="A":
    print(s[:k-1]+"a"+s[k:])
elif s[k-1]=="B":
    print(s[:k-1]+"b"+s[k:])
else:
    print(s[:k-1]+"c"+s[k:])

Submission status: Accepted

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

for i in range(N):
  if i==K-1:
    S3+=S2[i]
  else:
    S3+=S[i]
    
print(S3)

Submission status: Accepted

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

part1 = s[:k - 1]
part2 = s[k - 1].lower()
part3 = s[k:]

# print(f'{part1}{part2}{part3}')
print('{part1}{part2}{part3}'.format(part1=part1, part2=part2, part3=part3))

Submission status: Accepted

Solution code:
def main():
    n,k = map(int, input().split())
    k-=1
    s = list(input().rstrip())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N , K = [int(n) for n in 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())
c = input()
d = c[0:b - 1]
e = c[b - 1:b]
f = c[b:a]
print(d + str.lower(e) + f)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
s = input()
kb = ''
if k >= 2:
  kb = s[:k-1]
kk = s[k-1]
ka = ''
if k < len(s):
  ka = s[k:]

if kk == 'A':
  print(kb + 'a' + ka)
  exit()
if kk == 'B':
  print(kb + 'b' + ka)
  exit()
if kk == 'C':
  print(kb + 'c' + ka)
  exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

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

print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    print(''.join(S))


resolve()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s = list(s)

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

Submission status: Accepted

Solution code:
def main():
  num = list(map(int,input().split()))
  s=input()
  print(s[0:num[1]-1]+s[num[1]-1].lower()+s[num[1]:num[0]])
main()

Submission status: Accepted

Solution code:

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

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

s = s[0:k-1] + tmp + s[k:]

print(s)

Submission status: Accepted

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


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

print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n, k = LI()
s = S()
c = s[k - 1].lower()
print(s[:k - 1] + c + s[k:])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin
def S(): return stdin.readline().rstrip()
def LI(): return list(map(int,stdin.readline().rstrip().split()))

tmp = LI()
n,k = [tmp.pop(0) for _ in range(2)]
s = list(S())
k -= 1
l = {'A':'a', 'B':'b', 'C':'c'}

s[k] = l[s[k]]

ans = ''

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
for i,s in enumerate(input()):
  if i == b-1:
    s = chr(ord(s)+32)
  print(s,sep='',end='')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def intMap(): return map(int,input().split())

n,k = intMap()
s = input()

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

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
z = list(input())
z[y-1] = z[y-1].lower()
print("".join(z))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print("".join(s))

Submission status: Accepted

Solution code:
import re
a = input()
b = input()
c = re.search('(\d+)\s(\d+)', a)
d = int(c.group(1))
e = int(c.group(2))
result = ''
for n in range(d):
    if n == e - 1:
        r = str(b[n]).lower()
        result += r
    else:
        result += b[n]
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
s=input()
count=0
result=''
for i in s:
    count+=1
    if count==k:
        S=i.lower()
        result+=S
    else:
        result+=i
print(result)

Submission status: Accepted

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

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!python3

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

# input
N, K = LI()
S = input()


def main():
    ans = list(S)
    d = {
        "A": "a",
        "B": "b",
        "C": "c"
    }
    
    ans[K - 1] = d[S[K - 1]]
    print("".join(ans))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print("".join(S))

Submission status: Accepted

Solution code:
N, K = input().split()
K = int(K)
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(str(input()))

S[K-1] = chr(ord(S[K-1]) + 32)
S = "".join(S)
print(S)

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
N,k = map(int,input().split())
S = list(input())[:-1]
s = S[k-1]
if s == "A":
    S[k-1] = "a"
if s == "B":
    S[k-1] = "b"
if s == "C":
    S[k-1] = "c"
print("".join(S))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
try:
    from typing import List
except ImportError:
    pass


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


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

result = ""

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

print(result)

Submission status: Accepted

Solution code:
n,k=[int(x) for x in input().rstrip().split()]
S=[i for i in 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()
print("".join(s))

Submission status: Accepted

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

ans = ""

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

print(ans)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
  N, M = map(int, input().strip().split())
  S = input().strip()
  
  print(S[:M-1] + S[M-1].lower() + S[M:])


if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
from collections import Counter 
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import sys
sys.setrecursionlimit(10**6)

#n=int(input())
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
input_list = lambda : list(map(int,input().split()))

n,k=input_list()
k-=1
s=[v for v in input()]

diff=ord("A")-ord("a")

s[k]=(chr(ord(s[k])-diff))
print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

S = list(input())

S[K-1] = chr(ord(S[K-1])+32)
print("".join(map(str,S)))

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
N,K = (int(x) for x in input().split())
S =input().strip()
S_small=S.lower()
ans =S[:K-1] +S_small[K-1] +S[K:]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print("".join(s))

Submission status: Accepted

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

s="ABCabc"
ans=[]
for i in range(len(S)):
    if i==k-1:
        ans.append(s[s.index(S[i])+3])
    else:
        ans.append(S[i])
print("".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

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

print("".join(S))