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: Runtime Error

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

Submission status: Runtime Error

Solution code:
alpha1='abcdefghijklmnopqrstuvwxyz'
alpha2='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n,k = list(map(int,input().split(" ")))
s = input()

for i in range(26):
  if alpha2[i] == s[k-1]:
    t = i
    break
s[k-1] = alpha1[t]
print(s)

Submission status: Runtime Error

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

if (S[K] == 'A'):
  S[K] = 'a'
elif (S[K] == 'B'):
  S[K] = 'b'
else:
  S[K] = 'c'
    
print(S)

Submission status: Runtime Error

Solution code:
miu = input().split()
sella = input()

for x in sella:
	if x == int(miu[1]):
		print(x.lower(), end='')
    else:
		print(x, end='')

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!

inp = input().split()
N = int(inp[0])
K = int(inp[1])

S = input()

ch:str = S[K - 1]


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

Submission status: Runtime Error

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


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

Submission status: Runtime Error

Solution code:
miu = input().split()
sella = input()
 
for x in sella:
	if x == int(miu[1]):
		print(x.lower(), end='')
    else:
		print(x, end='')

Submission status: Runtime Error

Solution code:
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(n, k, S):
    return S[:k-1]+S[k-1].lower()+S[k:]


do_submit = True
#do_submit = False

def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    n, k = list(map(int, input().split()))
    S = input().split()
    print(sol(n, k, S))
    # S = input().strip()
    # print(sol(S))

Submission status: Runtime Error

Solution code:
N = int(input())
K = int(input())
S = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
for i in range(n):
    s = 'i'.lower()

print(s)

Submission status: Runtime Error

Solution code:
n, k = (int(i) for i in input().split())  
s=str(input())
if k == n:
    r=s[0:(k-1)] + s[k].lower()
elif k == 0:
    r=s[0:(k-1)].lower() + s[k]
else:
    r=s[0:(k-1)] + s[k-1].lower() + s[k]
print(r)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

abc = "ABCAB" * 10

abc = abc[:n+1]
print( abc[:k] + abc[k].lower() + abc[k+1:-1])

Submission status: Runtime Error

Solution code:
ls = input().split()
s = list(input())

n = int(ls[0])
k = int(ls[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: Runtime Error

Solution code:
$S=input()
$K=input()

char_list = list(S)
char_list[K] = char_list[K].lower()

print(char_list)

Submission status: Runtime Error

Solution code:
alpha1='abcdefghijklmnopqrstuvwxyz'
alpha2='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n,k = list(map(int,input().split()))
s = input()

for i in range(26):
  if alpha2[i] == s[k-1]:
    t = i
    break
s[k-1] = alpha1[t]
print(s)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

if (S[K] == 'A'):
  S[K] = 'a'
elif (S[K] == 'B'):
  S[K] = 'b'
else:
  S[K] = 'c'
    
printf(S)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>

using namespace std;

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)

int inputValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    rep(i, a){
        cin >> p[i];
    }
};

int main(int argc, const char * argv[]) {

    // source code
    int N, K;
	cin >> N >> K;
  	char s[N];
    cin >> s;

    s[K-1] += 0x20;
  	cout << s <<endl;


    return 0;
}

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

Solution code:
N,K = (i for i in input().split())
K = int(K)
X = list(N)
if X[K-1] == 'A':
    X[K-1] = 'a'
if X[K-1] == 'B':
    X[K-1] = 'b'
if X[K-1] == 'C':
    X[K-1] = 'c'
print(''.join(X))

Submission status: Runtime Error

Solution code:
X = int(input().split())
N = int(X[0])
K = int(X[1])
S = list(str(input()))

if S[K]=="A":
    S[K] = "a"
elif S[K]=="B":
    S[K] = "b"
elif S[K]=="C":
    S[K] = "c"
for i in S:
  print(i, end ="")

Submission status: Runtime Error

Solution code:
n=int(input())
k=int(input())
s=str(input())
if k == n:
    r=s[0:(k-1)] + s[k].lower()
elif k == 0:
    r=s[0:(k-1)].lower() + s[k]
else:
    r=s[0:(k-1)] + s[k-1].lower() + s[k]
print(r)

Submission status: Runtime Error

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

s=list(S)
if s[K]=="A":
    s[K]='a'
elif s[K]=='B':
    s[K]='b'
elif s[K]=='C':
    s[K]='c'
print(s)

Submission status: Runtime Error

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

if (S[K] == 'A'):
  S[K] = 'a'
elif (S[K] == 'B'):
  S[K] = 'b'
else:
  S[K] = 'c'
    
printf(S)

Submission status: Runtime Error

Solution code:
length, pos = input().split(' ')
length,pos = int(length), int(pos)
target = input()
if target[pos-1] == 'A':
  target[pos-1] = 'a'
if target[pos-1] == 'B':
  target[pos-1] = 'b'
if target[pos-1] == 'C':
  target[pos-1] = 'c'

print(target)

Submission status: Runtime Error

Solution code:
X = input()
n = int(input())
X_list = list(X)

if X_list[n-1] == 'A':
    X_list[n-1] = 'a'
elif X_list[n-1] == 'B':
    X_list[n-1] = 'b'
elif X_list[n-1] == 'C':
    X_list[n-1] = 'c'

X_changed = "".join(X_list)
print(X_changed)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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


if a[n[1]] == "A":
    a[n[1]] ="a"
if a[n[1]] == "B":
    a[n[1]] ="b"
if a[n[1]] == "C":
    a[n[1]] ="c"

Submission status: Runtime Error

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

if (S[K] == 'A'):
	S[K] = 'a'
elif (S[K] == 'B'):
    S[K] = 'b'
else:
	S[K] = 'c'
    
printf(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

S = input()

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

print(replaced_S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(S[:K] + {'A': 'a', 'B': 'b', 'C': 'c'}[S[K]] + (S[K+1:] if K+1 < N else ''))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input().split()
b = input()

list = list(b)

for i in list:
  if i == a[1] - 1:
    list[i] = list[i].lower()
    
print(''.join(list))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if S[listNK[1]-1]=="A":
    S[listNK[1]-1] = "a"
if S[listNK[1]-1]=="B":
    S[listNK[1]-1] = "b"
if S[listNK[1]-1]=="C":
    S[listNK[1]-1] = "c"

output = ""
for i in range(listNK[0]):
    output = output + S[i]

print(output)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input().split()
c = list(input()) 
c[int(n[1])] = c[int(n[1])].lower()
print("".join(c))

Submission status: Runtime Error

Solution code:
import numpy as np
n,k=map(int,input().split())
s=list(input())
s[k]=s[k].lower()
for i in range(len(s)):
  print(s[i],end="")
#print()

Submission status: Runtime Error

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

S = input()

string = list(S)

string[K+1] = string[K+1].lower()

print(''.join(string))

Submission status: Runtime Error

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

s_temp = s.swapcase()

ans = s[:k]+s_temp[k]+s[k+1:]

print(ans)

Submission status: Runtime Error

Solution code:
miu = input().split()[1]
sella = input()
 
sella[int(miu)-1] = sella[int(miu)-1].lower()
 
print(sella)

Submission status: Runtime Error

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

mojiretu_list = [0 for _ in range(N)]
for i in range(N):
    mojiretu_list[i] = string[i]

if mojiretu_list[k] == 'A':
    mojiretu_list[k] = 'a'

if mojiretu_list[k] == 'B':
    mojiretu_list[k] = 'b'

if mojiretu_list[k] == 'C':
    mojiretu_list[k] = 'c'

ans = ''
for i in range(N):
    ans += mojiretu_list[i]

print(ans)

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

B = S[A[1]]

if(B == "A"):
    B = "a"
else if(B == "B"):
    B = "b"
else:
    B = "c"

S[A[1]] = B
print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import numpy as np
n,k=map(int,input().split())
s=list(input())
s[k]=s[k].lower()
for i in range(len(s)):
  print(s[i],end="")
print("")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <map>
#include <utility>
typedef long long lint;
//#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
#define INF 1e18

int main()
{
	int N, K;
	cin >> N >> K;
	string S;
	cin >> S;


	S[K-1] = char(int(S[K-1] - (int('A') - int('a')))) ; 

	cout << S << endl;

	return 0;
}

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
s = list(input())
s[b] = s[b].lower()
s = str(s)
print('{}'.format(s))

Submission status: Runtime Error

Solution code:
n, k = input().split(' ')
n = int(n)
k = int(k)
s = input()
if(s[k]=='A'):
	s[k]=a
elif(s[k]=='B'):
	s[k]=b
elif(s[k]=='C'):
	s[k]=c

print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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


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


if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(S[1:K] + {'A': 'a', 'B': 'b', 'C': 'c'}[S[K]] + (S[K+1:] if K+1 < N else ''))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
miu = input().split()[1]
sella = input()

sella[int(miu)+1].lower()

print(sella)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
txt = input()
txt[b] = txt[b].lower()
print(txt)

Submission status: Runtime Error

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_str()
    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)
    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: Runtime Error

Solution code:
a,b = map(int,input().split())
txt = input()
txt[b] = txt[b].lower
print(txt)