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 = 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"
           
"".join(S)

S_1 = S[0]
for i in range(1,N):
  S_1 = S_1 + S[i]
print(S_1)

Submission status: Accepted

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

Submission status: Accepted

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

ABC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
abc = 'abcdefghijklmnopqrstuvwxyz'
print(s[:k-1] + abc[ABC.index(s[k-1])] + s[k:])

Submission status: Accepted

Solution code:
N,K=map(int, input().split())
S=input().strip()
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:
def str_replace_to_lower() -> str:
    len_str, target_index = map(int, input().split())
    word = input()
    list_of_word = list(word)
    list_of_word[target_index - 1] = list_of_word[target_index - 1].lower()

    return ''.join(list_of_word)


print(str_replace_to_lower())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int,input().split())
S = input()
ans = []
for i in range(N):
    if i == K - 1:
        x = ord(S[i])
        x += 32
        y = chr(x)
        ans.append(y)
    else:
        ans.append(S[i])

print(''.join(ans))

Submission status: Accepted

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

ss=s[k-1]
p=ss.lower()
#print(p)
s[k-1]=p
#print(s[k-1])
#print(s)

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC126
# A Changing a Character
n, k = map(int, input().split())
S = list(input())
x = S.pop(k-1).lower()
S.insert((k-1),x)
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:
_, K = [int(i) for i in 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]=str.lower(s[k-1])
print(''.join(s))

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

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

print(''.join(S))

Submission status: Accepted

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

print("".join(S))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    n, k = map(int, input().split())
    s = input()
    
    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 = list(input())
s[k-1] = s[k-1].lower()
for i in s :
  print(i,end='')
print()

Submission status: Accepted

Solution code:
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    n, k = Input()
    s = input()
    print("".join(ch.lower() if index==k else ch for index, ch in enumerate(s, 1)))


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = str(input())
ans = ''
if s[k-1] == 'A':
    ans = s[:k-1] + 'a' + s[k:]
    print(ans)
    exit()
elif s[k-1] == 'B':
    ans = s[:k-1] + 'b' + s[k:]
    print(ans)
    exit()
elif s[k-1] == 'C':
    ans = s[:k-1] + 'c' + s[k:]
    print(ans)
    exit()

Submission status: Accepted

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

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=input().split()
a=int(a)
b=int(b)
c=input()
h,i,j=c[:(b-1)],c[b-1],c[(b):]
if i=="A":
  i="a"
if i=="B":
  i="b"
if i=="C":
  i="c"
print(h+i+j)

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

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

Submission status: Accepted

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

ans = ''
for i in range(N):
    if i != K - 1:
        ans += S[i]
    else:
        ans += S[i].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 = map(int,input().split())
S = input()

capital = ['A','B','C']
small = ['a','b','c']

i = capital.index(S[K-1])
ans = S[:K-1]+small[i]+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))

Submission status: Accepted

Solution code:
num = input().split()

N = int(num[0])
K = int(num[1])

S = input()

S2 = S[K-1]

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

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

Submission status: Accepted

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

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

    print(ans)


if __name__ == "__main__":
    main()

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=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower() 
print(''.join(s))

Submission status: Accepted

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

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

print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s[k-1]=chr(ord(s[k-1])+32)
ans=("").join(s)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


def solve():
    n, k = inl()
    s = list(ins())
    s[k - 1] = s[k - 1].lower()
    return "".join(s)


print(solve())

Submission status: Accepted

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

Submission status: Accepted

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

S=list(input())

eng=["a","b","c"]
ENG=["A","B","C"]

x=ENG.index(S[K-1])
S[K-1]=eng[x]

s=""
for i in range(len(S)):
    s+=S[i]
print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c[b-1]=c[b-1].lower()
print("".join(c))

Submission status: Accepted

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n,k=mp()
s=list(input())
s[k-1]=str.lower(s[k-1])
print(*s,sep="")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=list(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()
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"
    print("".join(s))
elif s[k-1] == "B":
    s[k-1] = "b"
    print("".join(s))
else:
    s[k-1] = "c"
    print("".join(s))

Submission status: Accepted

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

t = ""
for i in range(a):
  t += s[i]
  
print(t)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, K = LI()
    S = list(SS())

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

    print(''.join(S))

if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in s:
  print(i,end="")

Submission status: Accepted

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

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

Submission status: Accepted

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

c=b[K-1]
b[K-1]=c.lower()
print(''.join(map(str,b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    ans = "".join([S[:K - 1], S[K - 1].lower(), S[K:]])

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

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()
ans = ''

for p in range(len(s)):
  if p == k - 1:
    if s[p] == 'A':
      ans += 'a'
    elif s[p] == 'B':
      ans += 'b'
    elif s[p] == 'C':
      ans += 'c'
  else:
    ans += s[p]
    
print(ans)

Submission status: Accepted

Solution code:

def main():
    n, k = map(int, input().split())
    s = input()
    result = ''
    for i in range(0, len(s)):
        if i == k-1:
            result += s[i].lower()
        else:
            result += s[i]
    print(result)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

    answer += string

print(answer)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(S)

Submission status: Accepted

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

Submission status: Accepted

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

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 = 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:
x = [list(map(str, input().split())) for i in range(2)]
a = int(x[0][0])
b = int(x[0][1])
s = x[1][0]
l = []
for i in range(a):
  l += s[i]
l[b-1] = l[b-1].lower()
my_result = l[0]
for i in range(1,a):
  my_result += l[i]
print(str(my_result))

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc126_a

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

for i in range(n):
    s = word[i]
    if i == k - 1:
        s = s.lower()
    res += s

print(res)

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

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


n, k = nm()
k -= 1
S = list(input())
S[k] = S[k].lower()
print(''.join(S))

Submission status: Accepted

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

print(S[:K-1] + tmp + S[K:])

Submission status: Accepted

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

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

print(''.join(S))

Submission status: Accepted

Solution code:
_,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:
a,b=map(int, input().split())
s=str(input())
b=b-1
slist=list(s)
if slist[b]=="A":
  slist[b]="a"
if slist[b]=="B":
  slist[b]="b"
if slist[b]=="C":
  slist[b]="c"
s="".join(slist)
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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())
for i in range(n):
    temp = str(s[i])
    if i == k - 1:
        s[i] = temp.lower()  
S = ''.join(s)         
print(S)

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

n,k=I()
s=X()
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())
S[K-1] = S[K-1].lower()
for i in S:
    print(i, end='', sep='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = str(input())
ans = ''
for i in range(N):
    if i == K-1:
        temp = S[i].lower()
        ans += temp
    else:
        ans += S[i]

print(ans)

Submission status: Accepted

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

res = ""
for i in range(n):
    if i + 1 == k:
        res += s[i].lower() 
    else:
        res += s[i]

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

N, K = map(int, input().strip().split())
s = input()
res = ''
for i in range(N):
    if i == K - 1:
        res += s[i].lower()
    else:
        res += s[i]
print(res)

Submission status: Accepted

Solution code:
N,K=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"


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

Submission status: Accepted

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

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

Submission status: Accepted

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

k = k-1

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

Submission status: Accepted

Solution code:
#N = int(input())
#S = str(input())
#A, B = map(int, input().split())
#C = list(map(int, input().split()))

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

d = ["A", "B", "C"]
e = ["a", "b", "c"]

for i in range(N):
  if i == K - 1:
    inde = d.index(S[i])    
    print(e[inde], end = "")
  else:
    print(S[i], end = "")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
small = ['a', 'b', 'c']
capital = ['A', 'B', 'C']
 
tmp = input().split(" ")
N = int(tmp[0])
K = int(tmp[1])
str = list(input())
 
str[K - 1] = small[capital.index(str[K - 1])]
 
print("".join(str))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys  import stdin,stdout

import bisect

import math

def st():
    return list(stdin.readline().strip())

def inp():
    return int(stdin.readline())

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

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

def pr(n):
    stdout.write(str(n)+"\n")

def soe(limit):
    l=[1]*(limit+1)
    prime=[]
    for i in range(2,limit+1):
        if l[i]:
            for j in range(i*i,limit+1,i):
                l[j]=0

    for i in range(2,limit+1):
        if l[i]:
            prime.append(i)
    return prime

def segsoe(low,high):
    limit=int(high**0.5)+1
    prime=soe(limit)
    n=high-low+1
    l=[0]*(n+1)
    for i in range(len(prime)):
        lowlimit=(low//prime[i])*prime[i]
        if lowlimit<low:
            lowlimit+=prime[i]
        if lowlimit==prime[i]:
            lowlimit+=prime[i]
        for j in range(lowlimit,high+1,prime[i]):
            l[j-low]=1
    for i in range(low,high+1):
        if not l[i-low]:
            if i!=1:
                print(i)
                
def gcd(a,b):
    while b:
        a=a%b
        b,a=a,b
    return a

def power(a,n):
    r=1
    while n:
        if n&1:
            r=(r*a)
        a*=a
        n=n>>1
    return r
    
def solve():
    n,k=mp()
    s=input()
    for i in range(n):
        if i==k-1:
            print(s[i].lower(),end="")
        else:
            print(s[i],end="")
        
    



for _ in range(1):
    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:
n,k=map(int,input().split());s=input();print(*[s[i] if k-1!=i else s[i].lower() for i in range(n)],sep='')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [int(s) for s in input().split()]
b = input()
c = list(b)
c[a[1] - 1] = c[a[1] - 1].lower()
print(''.join(c))

Submission status: Accepted

Solution code:
# for #!/usr/bin/env python
import os
import sys
from io import BytesIO, IOBase


# region fastio

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):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    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)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


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

# endregion
class union_find:
    def __init__(self, n):
        self.n = n
        self.rank = [0]*n
        self.parent = [int(j) for j in range(n)]
    
    def union(self,i,j):
        i = self.find(i)
        j = self.find(j)
        if self.rank[i] == self.rank[j]:
            self.parent[i] = j
            self.rank[j] += 1

        elif self.rank[i] > self.rank[j]:
            self.parent[j] = i
        else:
            self.parent[i] = j

    def find(self, i):
        temp = i
        if self.parent[temp] != temp:
            self.parent[temp] = self.find(self.parent[temp])
        return self.parent[temp]
def main():
# Enter your code here. Read input from STDIN. Print output to STDOUT
    n,k = [int(j) for j in input().split()]
    s = list(input())
    s[k-1] = s[k-1].lower()
    print("".join(s))
        





        
                # ls[i+1]=
            # base = f
        # print()


        
        




        # l = [int(j) for j in input().split()]




if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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