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:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


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



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # 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 = [i for i in input()]
s[k-1] = s[k-1].lower()
print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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


print(st)

Submission status: Accepted

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

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

for str in Slist:
  print(str, end='')

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = [i for i in input()]
ans = []

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

print("".join(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input().split()                                                             
N = [int(n) for n in N]                                                         
S = input()                                                                     
s = S.swapcase()                                                                
ans = str(S[0:N[1]-1] + s[N[1]-1] + S[N[1]:])                                   
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

n, k = map(int, sys.stdin.readline().split())
s = sys.stdin.readline().rstrip()

def main():
    return s[:k-1] + s[k-1].lower() + s[k:]

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

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

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:
_, k = map(int, input().split())
s = input()
print("{}{}{}".format(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:
        ans += S[i].lower()
    else:
        ans += S[i]
print(ans)

Submission status: Accepted

Solution code:
n, 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=str(input())
a=["a","b","c"]
A=["A","B","C"]
T=str()
for i in range(N):
    if i==K-1:
        T=T+a[A.index(S[i])]
    else:
        T=T+S[i]
print(T)

Submission status: Accepted

Solution code:
n, k = list(map(int, input().split()))
print(''.join(v.lower() if i + 1 == k else v for i, v in enumerate(input())))

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

mod = 1000000007
inf = 1 << 60

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

n, k = na()
s = ns()
t = [s[i] for i in range(n)]
t[k - 1] = t[k - 1].lower()

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

Submission status: Accepted

Solution code:
from sys import stdin
N, K = [int(i) for i in stdin.readline().rstrip().split()]
S = stdin.readline().rstrip()
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"
print("".join(S))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
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:
import sys
import math

num = list(map(int,input().split()))
N=num[0]
k=num[1]
s=input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = [int(s) for s in input().split(' ')]
S = input()
k = K - 1
print(S[:k] + S[k].lower() + S[k+1:])

Submission status: Accepted

Solution code:
import os, sys, re, math

(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:
_, b = list(map(int, input().split(' ')))
s = input()
new_s = ''
for i in range(len(s)):
    new_s += s[i] if i+1 != b else s[i].lower()
print(new_s)

Submission status: Accepted

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

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:
def main():
    N,K = map(int, input().split())
    S = input()
    out_str = ""
    for i in range(N):
        if i==K-1:
            out_str+=S[i].lower()
        else:
            out_str+=S[i]
    print(out_str)
main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = (int(x) for x in input().split())
word = list(input())
new_word = ""
word[b-1] = word[b-1].lower()
for i in word:
    new_word += i
print(new_word)

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] + s[K-1:].capitalize().swapcase())

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#INPUT
#N K
#S

#1≤N≤50
#1≤K≤N
#Sは A, B, C からなる長さNの文字列

#ex
#3 1
#ABC

#OUTPUT
#文字列SのK文字目を小文字に書き換え、新しくできたSを出力せよ。

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

if K==1 :
    str1 = ''
else :
    str1 = S[0:K-1]

if K==N:
    str3 = ''
else :
    str3 = S[K:N]

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

print(str1+str2+str3)

Submission status: Accepted

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

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

print("{}{}{}".format(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])+ord('a')-ord('A'))
print(''.join(s))

Submission status: Accepted

Solution code:
import math
import sys
import numpy as np

def int_input():
    return map(int, input().split())

n, k = int_input()
s = list(input())
s[k - 1] = chr(ord(s[k - 1]) + 32)
for i in range(n):
    print(s[i], end = "")

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

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(*s,sep='')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    _, 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 = input()
K = K - 1
r = S[:K]
r = r + S[K].lower()
r = r + S[K+1:]
 
print(r)

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
#print(n,k)
S=list(input())
#print(S)
s=S.pop(k-1)
#print(s)
s=s.lower()
#print(s)
S.insert(k-1, s)

print(''.join(S))

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 12, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, K = map(int, readline().split())
S = read().decode('utf8')
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()

a = s[:k-1]
b = s[k-1].lower()
c = s[k:]

print(a + b + c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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 = (int(i) for i in 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:
a, b = map(int, input().split())
c = input()
print(c[0:b-1]+c[b-1].lower()+c[b:])

Submission status: Accepted

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

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

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

Submission status: Accepted

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

#output
for i in range(K-1):
    print(S[i], sep = "", end = "")
print(S[K-1].lower(), sep = "", end = "")
for i in range(K, N):
    print(S[i], sep = "", end = "")

Submission status: Accepted

Solution code:
# coding: utf-8

N, K = (int(x) for x in input().split())
S = input()

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

Submission status: Accepted

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

for i in range(n):
    if i == k - 1:
        print(chr((ord(s[i])+32)), end='')
    else:
        print(s[i], end='')
print()

Submission status: Accepted

Solution code:
X = [int(i) for i in input().split()]
S = list(input())

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

print(''.join(S))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

n, k = x.split()
k = int(k)
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())
if s[k-1] == "A":
  s[k-1] = "a"
elif s[k-1] == "B":
  s[k-1] = "b"
else:
  s[k-1] = "c"
print(*s,sep="")

Submission status: Accepted

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

str_list = list(before_str)
str_list[K-1] = str_list[K-1].swapcase()

after_str = ''.join(str_list)

print(after_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:
#!/usr/bin/env python3

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

main()

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
s=input()
for i in range(len(s)):
  if i+1==b:
    print(s[i].lower(),end='')
    continue
  print(s[i],end='')

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n,k=INTM()
    s=STR()
    if k>1and k!=n:
        S=s[0:k-1]+s[k-1].lower()+s[k:n]
        print(S)
    elif k==1:
        S=s.capitalize()
        S=S.swapcase()
        print(S)
    else:
        S=s[0:n-1]+s[n-1].lower()
        print(S)
if __name__ == '__main__':
    do()

Submission status: Accepted

Solution code:
N, K = map(int, input().strip().split())
S = input().strip()
for i in range(N):
    print(chr(ord(S[i])+32) if i == K-1 else S[i], end="")
print()

Submission status: Accepted

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

pos = 1

for s_i in s:
  if pos == k:
    print(s_i.lower(), end = '')
  else:
    print(s_i, end = '')
  
  pos += 1

Submission status: Accepted

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

K-=1

if S[K]=="A":
   S=[c for c in S]
   S[K]="a"
   print("".join(S))

elif S[K]=="B":
   S=[c for c in S]
   S[K]="b"
   print("".join(S))

else:
   S=[c for c in S]
   S[K]="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()
print(''.join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
s=list(input())
s[b-1]=str.swapcase(s[b-1])
ans=""
for i in range(a):
    ans+=s[i]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 = list(input())


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

print(*S,sep="")

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

Submission status: Accepted

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

output = ''
cnt = 0
for i in S:
    cnt += 1
    if cnt == K:
        output += i.lower()
    else :
        output += i

print(output)

Submission status: Accepted

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

print("".join(s))

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = input()
count = 1
out = ""

for s in S:
    if count == K:
        s = s.lower()
    out += s
    count += 1
    
print(out)

Submission status: Accepted

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

Submission status: Accepted

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

small = {'A':'a', 'B':'b', 'C':'c'}
print(S[:K-1] + small[S[K-1]] + S[K:])

Submission status: Accepted

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

s = input()

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

print(s_)

Submission status: Accepted

Solution code:
num = list(map(int,input().split()))
moji = input()
for o in range(num[0]):
	if(o == num[1]-1):
		print(moji[o].lower(),end="")
	else:
		print(moji[o],end="")

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:
a,b=map(int,input().split())
s=[i for i in input()]
b-=1
s[b]=s[b].lower()
print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

print(S[:K-1] + tmp + 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(str(input()))
S[K-1] = S[K-1].lower()
print("".join(S))

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:]
else:
  s=s[:k-1]+'c'+s[k:]
print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

S = ''

for i in range(N):
  if i+1 == K:
    S += s[i].lower()
  else:
    S += s[i]
    
print(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 range(n):
    print(s[i],end="")

Submission status: Accepted

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

ans = ""
for i in range(N):
    if i == K-1 and S[i] == "A":
        ans += "a"
    elif i == K-1 and S[i]  == "B":
        ans += "b"
    elif i == K-1 and S[i]  == "C":
        ans += "c"
    else:
        ans += S[i]
print(ans)

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

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

for i in range(N):
  if K - 1 == i:
    print(m[S[i]], end='')
  else:
    print(S[i], end='')
print()

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:]
else:
  s=s[:k-1]+'c'+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 = input()
S_list =list(S)
l ={"A":"a","B":"b","C":"c"}
ans=S_list[K-1]
S_list[K-1]=l[ans]
print("".join(S_list))

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n,k = LI()
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 = 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()
sk = s[k-1].lower()
print(s[:k-1] + sk + s[k:])

Submission status: Accepted

Solution code:
N, K = list(map(int, input().split()))
S = list(str(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())#listで受け取る

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

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=str(input())
T=""
for i in range(len(S)):
    if i+1 == K:
        T += S[i].lower()
    else:
        T += S[i]
print(T)

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"

ss = "".join(s)

print(ss)

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

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

Submission status: Accepted

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

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

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()
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:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k = [int(x) for x in input().split()]
s = list(input())

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

Submission status: Accepted

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

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

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:
a,b = map(int, input().split())
c = input()
print(c[:b-1]+c[b-1].lower()+c[b:])

Submission status: Accepted

Solution code:
N,b=map(int,input().split())
S=input()
S=S[:b-1]+S[b-1].lower()+S[b:]
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:
#a
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()
if s[k-1]=="A":
    print(s[:k-1]+"a"+s[k:])

if s[k-1]=="B":
    print(s[:k-1]+"b"+s[k:])

if s[k-1]=="C":
    print(s[:k-1]+"c"+s[k:])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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 = list(map(int, input().split()))
S = list(input())
c = S[K-1]
S[K-1] = c.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:
n, k = map(int, input().split())
s = list(map(str, input()))
a = s[k-1]
s[k-1] = a.lower()
s = "".join(s)
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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

print("".join(S))

Submission status: Accepted

Solution code:
N,K = (int(x) for x in 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"
S = "".join(S)
print(S)

Submission status: Accepted

Solution code:
#!/usr/bin/python

data1 = input().rstrip().split()
data2 = input()
n = int(data1[0])
k = int(data1[1])

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

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())
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()
S[K-1].lower()
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=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,M = input().strip().split()
K = int(M)
S = input()
if K <= int(N):
  print(S[:K-1]+S[K-1].lower()+S[K:])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = input()
s = list(input())

p = int(n.split()[1])

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

print(''.join(s))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N,K=map(int,input().split()) #文字列 S の K 文字目を小文字
S=input()

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

Submission status: Accepted

Solution code:
p,q=map(int,input().split())
s=input()
a=[]
for i in s:
    a.append(i)
q=q-1
a[q]=chr(ord(a[q])+32)
print(''.join(a))

Submission status: Accepted

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

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

# print(c_lower)

ans = s[:k-1] + c_lower + s[k:] 

print(ans)

Submission status: Accepted

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

for i in range(len(S)):
    if i == K - 1:
        if S[i] == "A":
            print("a", end="")
        elif S[i] == "B":
            print("b", end="")
        else:
            print("c", end="")
    else:
        print(S[i],end="")