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:
a,b=map(int, input().split())
K = b-1
S = list(input())
if S[K] == 'A':
    S[K] = 'a'
elif S[K] == 'B':
    S[K] = 'b'
elif S[K] == 'C':
    S[K] = 'c'
print(''.join(S))

Submission status: Accepted

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

solve(s, n, 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=ans+s[i].lower()
    else:
        ans=ans+s[i]
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()

    S = ''.join(S) 

    print(S)

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8

n, k = [int(x) for x in input().rstrip().split(" ")]
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
[N,K] = [int(i) for i in input().split()]
S = input()
ans = []
for idx,s in enumerate(S):
    if idx+1 == K:
        ans.append(s.lower())
    else:
        ans.append(s)
print("".join(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:
N,K=[int(x) for x in input().split()]
K-=1
S=input()
ans=S[:K]+S[K].lower()+S[K+1:]
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ll=lambda : list(map(int,input().split()))

[n,k]=ll()
s=input()
k-=1
s=list(s)
s[k]=s[k].swapcase()
print("".join(s))

Submission status: Accepted

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

K=K-1

S0 = S[0:K]
S1 = S[K:K+1]
S2 = S[K+1:N]

Sout = S0 + S1.lower() + S2

print(Sout)

Submission status: Accepted

Solution code:
def solve():
    N, K = map(int, input().split())
    S = list(input())
    
    S[K-1] = chr(ord(S[K-1])+32)    
    
    print (''.join(S))
    
if __name__ == "__main__":  
    solve()

Submission status: Accepted

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

new_s = ""
for i, elem in enumerate(s):
    if i == k - 1:
        new_s += elem.lower()
    else:
        new_s += elem
print(new_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 = input()
oo = ['A','B','C']
syo = ['a','b','c']
for i in range(n):
    if k-1 == i:
        for j in range(3):
            if s[i] == oo[j]:print(syo[j],end = '')
    else:
        print(s[i],end = '')
print()

Submission status: Accepted

Solution code:
order = input().split(' ')[1]

words = input()

ans_word = []
for i in range(len(words)):
  if i+1 == int(order):
    ans_word.append(words[i].lower())
  else:
    ans_word.append(words[i])
    
print(''.join(ans_word))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N,K = [int(i) for i in input().split()]
s= input()
a = s[0:K-1]
b = s[K:N]
print(a+s[K-1:K].lower()+b)

Submission status: Accepted

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

if s[k-1]=="A":
    print(s[0:k-1]+"a"+s[k:n])
elif s[k-1]=="B":
    print(s[0:k-1]+"b"+s[k:n])
elif s[k-1]=="C":
    print(s[0:k-1]+"c"+s[k:n])

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"
if S[K-1]=="B":
    S[K-1] = "b"
if S[K-1]=="C":
    S[K-1] = "c"
S_ = ""
for x in S:
    S_+=x
print(S_)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
N,K=[int(x) for x in stdin.readline().rstrip().split()]
S=(stdin.readline().rstrip())
ans=""
for ind,s in enumerate(S):
    if ind+1 == K:
        ans += s.lower()
    else:
        ans += s
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

word = S[:]

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 = list(S)

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, M = map(int, input().split())
s = input()

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

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

Submission status: Accepted

Solution code:
n,k = (int(num) for num in input().split())
S = input()
c = S[k-1]
if c == 'A':
    c = 'a'
if c == 'B':
    c = 'b'
if c == 'C':
    c = 'c'
    
left = ''
right = ''
    
if k > 0:
    left = S[:k-1]
if k < n:
    right = S[k:]
print(left + c + right)

Submission status: Accepted

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

Submission status: Accepted

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

sl = list(S)

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

ans = "".join(sl)
print(ans)

Submission status: Accepted

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

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 = list(map(int, input().split()))
s = list(input())

s_new = s
if s_new[k -1] == 'A':
    s_new[k -1] = 'a'
elif s_new[k -1] == 'B':
    s_new[k -1] = 'b'
elif s_new[k -1] == 'C':
    s_new[k -1] = 'c'
print(''.join(s_new))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  N, K = readInts()
  S = input()
  s = list(S)
  s[K-1] = s[K-1].lower()
  print("".join(s))

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline

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

Submission status: Accepted

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


def solve(N: int, K: int, S: str):
    sl = list(S)

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

    print(''.join(sl))
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))

n,k = getList()
s = input()
a = s[k-1].lower()
s = s[:k-1] + a + s[k:]
print(s)

Submission status: Accepted

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

# abc126_a

def main():
    # input
    n, k = [int(s) for s in input().split()]
    s = input()
    # get ans
    k = k-1
    ans = s[:k] + s[k].lower() + s[k+1:]
    # output
    print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def sub():
    N, K = [int(e) for e in input().split(" ")]
    S = input()
    ss = [s for s in S]
    ss[K-1] = ss[K-1].lower()
    print("".join(ss))

sub()

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

input = sys.stdin.readline
n, k = map(int, input().split())
s = input()
new = ''
for i in range(n):
    if i + 1 == k:
        new += s[i].lower()
    else:
        new += s[i]
print(new)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
inp = lambda cast=int: list(map(cast, input().split()))
printf = lambda s='', *args, **kwargs: print(str(s).format(*args), flush=True, **kwargs)

n, k = inp()
s, = inp(str)
r = s[:k-1] + s[k-1].lower() + s[k:]
print(r)

Submission status: Accepted

Solution code:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import copy
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right
# import numpy as np

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

############

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

ans = ""

for i, s in enumerate(S):
    if i+1 == K:
        s = s.lower()
    ans = ans + s

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(res)

Submission status: Accepted

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

Submission status: Accepted

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


def solve(N: int, K: int, S: str):
    k = K-1
    print(S[0:k],end="")
    print(S[k].lower(),end="")
    print(S[k+1:])
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
# coding: utf-8
# Your code here!

N, K = map(int, input().rstrip().split(' '))
X = [x for x in input()]
X[K-1] = X[K-1].lower()
print(''.join(X))

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right; sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; ansli = []; tmpli = []; candili = []
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]#WideIntPoint
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]#HeightString
def mi(n): return [wi() for _ in range(n)]#MatrixInt
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]

n, k = wi()
s = s()

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

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
S=input()
K=K-1
s=["A","B","C"]
t=["a","b","c"]
for i in range(3):
  if s[i]==S[K]:
    S=S[:K]+t[i]+S[K+1:]
print(S)

Submission status: Accepted

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

d=S[K-1].lower()
SS=[]
for i in range(N):
    if i!=K-1:
        SS.append(S[i])
    else:
        SS.append(d)
SSS=''.join(SS)
print(SSS)

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
abc = list(input())
if abc[k-1] == 'A':
    abc[k-1] = 'a'
if abc[k-1] == 'B':
    abc[k-1] = 'b'
if abc[k-1] == 'C':
    abc[k-1] = 'c'
print(''.join(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'
else:
    S[K-1] = 'c'

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
AtCoder C
"""
 
# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = int(input()) for _ in range(N) # 1 row N column
 
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
 
def main():
    A, B = list(map(int,input().split()))
    S =str(input())
    out=""
    i=1
    for s in S:
        if i==B:
            if s=="A":
                out+="a"
            elif s=="B":
                out+="b"
            elif s=="C":
                out+="c"
        else:
            out+=s
        i+=1
    print(out)
    
if __name__ == "__main__":
    main()

Submission status: Accepted

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

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"

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
import fractions
from collections import deque

INF = 10 ** 10

N, K = [int(x) for x in stdin.readline().rstrip().split()]
S = stdin.readline().rstrip()

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

print(ans)

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:
N,K = map(int,input().split())
S = list(input())
if S[K-1] == "A":
    S[K-1] = "a"
if S[K-1] == "B":
    S[K-1] = "b"
if S[K-1] == "C":
    S[K-1] = "c"

print(*S, sep="")

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()
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:k] == "A":
    s = s[:k-1] + "a" + s[k:]
elif s[k-1:k] == "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=input()
ans=""
for i in range(n):
  x=s[i]
  if i==k-1:
    x=x.lower()
  ans+=x
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:
import sys
range = xrange
input = raw_input

n,k = [int(x) for x in 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())
    
K -= 1 
if S[K] == "A": 
    S[K] = "a" 
elif S[K] == "B": 
    S[K] = "b" 
elif S[K] == "C": 
    S[K] = "c" 
 
print("".join(S))

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

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)


def main():
    n,k = LI()
    k -= 1
    s = S()

    return s[:k] + chr(ord(s[k]) - ord('A') + ord('a')) + s[k+1:]


print(main())

Submission status: Accepted

Solution code:
import math

x,y = map(int,input().split())
s = input()
sss = ""
for i,ss in enumerate(s):
    if i==y-1:
        sss += ss.lower()
    else:
        sss += ss

print(sss)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n,k = input().split()
n = int(n)
k = int(k)
s = 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:
_, pos = [int(a) for a in input().split()]

s = input()

ss = list(s)

ss[pos-1] = ss[pos-1].lower()

print(''.join(ss))

Submission status: Accepted

Solution code:

n,k = [int(i) for i in input().split()]
s = input()

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

Submission status: Accepted

Solution code:

from itertools import combinations
from itertools import product
import bisect
import math

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

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

print(s)

Submission status: Accepted

Solution code:

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq as hq
import itertools as its
import operator as op


# globals
inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    # ----------MAIN----------
    n, k = get_li()
    s = get_lc()
    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))
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input().strip()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().strip().split(sep=sep))]
        for _ in range(n)
    )))


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()
result = ''
for i, c in enumerate(s):
    if i == k-1:
        if c == 'A':
            result += 'a'
        elif c == 'B':
            result += 'b'
        elif c == 'C':
            result += 'c'
    else:
        result += c
print(result)

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"

if S[K-1] == "B":
    S[K-1] = "b"

if S[K-1] == "C":
    S[K-1] = "c"
    
print("".join(S))

Submission status: Accepted

Solution code:
n,k = list(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 sys
from collections import Counter
import string

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

Submission status: Accepted

Solution code:
import math
from functools import reduce

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

n,k = get_nums_l()
k -= 1
s = input()

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

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()
T = ""

for i in range(N):
    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())
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]

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

Submission status: Accepted

Solution code:
def solve():
    n, k = map(int, input().split())
    S= input()    
    S = list(S)
    S[k-1] = chr( ord(S[k-1]) - ord("A") + ord("a"))
    print("".join(S))
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:
N, K = [int(c) for c in input().split()]
S = input()

O = ''
for i,c in enumerate(S):
    O += c if i+1 != K else c.lower()

print(O)

Submission status: Accepted

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

Submission status: Accepted

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

ans = ''
for i,j in enumerate(S):
    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())
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 sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n,k = f()
    s = input()
    for i in range(n):
        if i == k-1:
            if s[i] == 'A':
                print('a', end= '')
            if s[i]== 'B':
                print('b', end='')
            if s[i] == 'C':
                print('c', end='')
        else:
        
            print(s[i], end = '')
    
    print()

solve()

Submission status: Accepted

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

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:
N,K=map(int,input().split())
S=input()
T=S[:K-1]
a=S[K-1].lower()
U=S[K:]
print(T+a+U)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - Changing a Character
https://atcoder.jp/contests/abc126/tasks/abc126_a

"""
import sys


def solve(N, K, S):
    ans = ''
    for i, s in enumerate(S, start=1):
        if i == K:
            ans += s.lower()
        else:
            ans += s
    return ans


def main(args):
    N, K = map(int, input().split())
    S = input()
    ans = solve(N, K, S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N,K=MAP()
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].swapcase()+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 = [int(x) for x in input().split()]
S = input()
print(S[:K-1]+chr(ord(S[K-1])+32)+S[K:])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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'

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