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:
# Lets goto the next level 
# AIM Specialist at CF *__* asap 
# template taken from chaudhary_19  
# Remember you were also a novice when you started, 
# hence never be rude to anyone who wants to learn something
# Never open a ranklist untill and unless you are done with solving problems, wastes 3/4 minuts 
# Donot treat CP as a placement thing, love it and enjoy it, you will succeed for sure.  
# Any doubts or want to have a talk, contact https://www.facebook.com/chaudhary.mayank


# ///==========Libraries, Constants and Functions=============///

import sys
from bisect import bisect_left,bisect_right,insort
from collections import deque,Counter
from math import gcd,sqrt,factorial,ceil,log10,log2,floor
from itertools import permutations
from heapq import heappush,heappop,heapify
inf = float("inf")
mod = 10**9+7
#sys.setrecursionlimit(10**9)


def factorial_p(n, p):
    ans = 1
    if n <= p // 2:
        for i in range(1, n + 1):
            ans = (ans * i) % p
    else:
        for i in range(1, p - n):
            ans = (ans * i) % p
        ans = pow(ans, p - 2, p)
        if n % 2 == 0:
            ans = p - ans
    return ans


def nCr_p(n, r, p):
    ans = 1
    while (n != 0) or (r != 0):
        a, b = n % p, r % p
        if a < b:
            return 0
        ans = (ans * factorial_p(a, p) * pow(factorial_p(b, p), p - 2, p) * pow(factorial_p(a - b, p), p - 2, p)) % p
        n //= p
        r //= p
    return ans

def prime_sieve(n):
    """returns a sieve of primes >= 5 and < n"""
    flag = n % 6 == 2
    sieve = bytearray((n // 3 + flag >> 3) + 1)
    for i in range(1, int(n**0.5) // 3 + 1):
        if not (sieve[i >> 3] >> (i & 7)) & 1:
            k = (3 * i + 1) | 1
            for j in range(k * k // 3, n // 3 + flag, 2 * k):
                sieve[j >> 3] |= 1 << (j & 7)
            for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
                sieve[j >> 3] |= 1 << (j & 7)
    return sieve
def prime_list(n):                            #<----- You have to call me if you wanna get list of primes upto range n
    """returns a list of primes <= n"""
    res = []
    if n > 1:
        res.append(2)
    if n > 2:
        res.append(3)
    if n > 4:
        sieve = prime_sieve(n + 1)
        res.extend(3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not (sieve[i >> 3] >> (i & 7)) & 1)
    return res
    
def is_prime(n):
    """returns True if n is prime else False"""
    if n < 5 or n & 1 == 0 or n % 3 == 0:
        return 2 <= n <= 3
    s = ((n - 1) & (1 - n)).bit_length() - 1
    d = n >> s
    for a in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]:
        p = pow(a, d, n)
        if p == 1 or p == n - 1 or a % n == 0:
            continue
        for _ in range(s):
            p = (p * p) % n
            if p == n - 1:
                break
        else:
            return False
    return True

def all_factors(n):
    """returns a sorted list of all distinct factors of n"""
    small, large = [],[]
    for i in range(1, int(n**0.5) + 1, 2 if n & 1 else 1):
        if not n % i:
            small.append(i)
            large.append(n//i)
    large.reverse()
    small.extend(large)
    return small


def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
# ///===========MAIN=============///
n,k=get_ints()
string=list(input());result=[]
for i in range(n):
    if i==k-1:
        result.append(chr(ord(string[i])+32))
    else:
        result.append(string[i])
print(''.join(result))

Submission status: Runtime Error

Solution code:
#A
N, K = map(int, input().split())
S = input()
print(S.replace(S[K],S[K].lower()))

Submission status: Runtime Error

Solution code:
a = input()

a = list(a)
b = a[0]+a[1]
c = a[2]+a[3]

b = int(b)
c = int(c)

if c >= 1 and c <= 12 and b >= 1 and b <= 12:
        print("AMBIGUOUS")

elif c >= 1 and c <= 12:
    print("YYMM")

elif b >= 1 and b <= 12:
    print("MMYY")
    
else:
    print('NA')

Submission status: Runtime Error

Solution code:
import random

N = random.randint(1,51)
K = random.randint(1,N)
string = ["A","B","C"]
S_list = random.choices(string,k=N)

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import numpy as np
words = lambda t : list(map(t, input().split()))



def search(i, visited, ns, ans) :
    #print(i+1)
    visited[i] = True
    for next, weight in ns[i]:
        if visited[next] == False:
            if weight % 2 == 0:
                ans[next] = ans[i]
            else:
                ans[next] = (ans[i]+1) % 2
            search(next, visited, ns, ans)


def dfs(ns, ans):
    visited = [False] * len(ns)
    search(0, visited, ns, ans)

def main():
    n = int(input())
    ns = [[] for _ in range(n)]
    for _ in range(n-1):
        (st,end,weight) = map(int,input().split())
        ns[st-1].append((end - 1,weight))
        ns[end-1].append((st-1,weight))
    ans = [0] * n
    dfs(ns, ans)
    for a in ans:
        print(a)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
n, k = input().split()
s = input()
num = 3
if (num - int(k)) == 0:
    sn = s[0] + s[1] + s[int(k)-1].lower()
    print(sn)
if (num - int(k)) == 1:
    sn = s[0] + s[int(k)-1].lower() + s[2]
    print(sn)
if (num - int(k)) == 2:
    sn = s[int(k)-1].lower() + s[1] + s[2]
    print(sn)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
from functools import reduce

N, K = map(int, input().split())
p = 0
dnms = []


def calc_p(n, c):
    return 1/n * pow(1/2, c)


def calc_dnm(n, c):
    return n * 2 ** c


def calc_lcm(ns):
    return reduce(lcm, ns, 1)


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


for i in range(1, N+1):
    score = i
    cnt = 0
    while score <= K:
        score *= 2
        cnt += 1
    dnms.append(calc_dnm(N, cnt))
    p += calc_p(N, cnt)

print(p)

l = calc_lcm(dnms)
mlcls = [l/x for x in dnms]
print(sum(mlcls) / calc_lcm(dnms))

Submission status: Runtime Error

Solution code:
s = str(input())
first = s[0] + s[1]
second = s[2] + s[3]
if int(first) <= 12 and int(first) > 0 and (int(second) > 12 or int(second) == 0):
    print("MMYY")
elif int(second) <= 12 and int(second) > 0 and (int(first) > 12 or int(first) == 0):
    print("YYMM")
elif int(second) <= 12 and int(second) > 0 and int(first) <= 12 and int(first) > 0:
    print("AMBIGUOUS")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
N = int(input())

BLACK = -1
GRAY = 0
WHITE = 1
nodes = [GRAY] * N
nodes[0] = BLACK
neighbors = [[] for _ in range(N)]

for n in range(N-1):
    u, v, w = [int(i) for i in input().split()]
    neighbors[u-1].append((v-1, w))
    neighbors[v-1].append((u-1, w))

for u in range(N):
    neiss = neighbors[u]
    for neis in neiss:
        v, w = neis
        if nodes[u] == GRAY and nodes[v] == GRAY:
            next
        if nodes[u] == GRAY:
            if w % 2 == 0:
                nodes[u] = nodes[v]
            else:
                nodes[u] = -nodes[v]
        if nodes[v] == GRAY:
            if w % 2 == 0:
                nodes[v] = nodes[u]
            else:
                nodes[v] = -nodes[u]

for u in range(N):
    neiss = neighbors[u]
    for neis in neiss:
        v, w = neis
        if nodes[u] == GRAY and nodes[v] == GRAY:
            next
        if nodes[u] == GRAY:
            if w % 2 == 0:
                nodes[u] = nodes[v]
            else:
                nodes[u] = -nodes[v]
        if nodes[v] == GRAY:
            if w % 2 == 0:
                nodes[v] = nodes[u]
            else:
                nodes[v] = -nodes[u]

for u in range(N):
    neiss = neighbors[u]
    for neis in neiss:
        v, w = neis
        if nodes[u] == GRAY and nodes[v] == GRAY:
            next
        if nodes[u] == GRAY:
            if w % 2 == 0:
                nodes[u] = nodes[v]
            else:
                nodes[u] = -nodes[v]
        if nodes[v] == GRAY:
            if w % 2 == 0:
                nodes[v] = nodes[u]
            else:
                nodes[v] = -nodes[u]

for n in nodes:
    if n == BLACK:
        print(0)
    else:
        print(1)

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'

Submission status: Runtime Error

Solution code:
s = list(str(i) for i input().split())
n = int(input())
k = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<iostream>
using namespace std;

int main(){
    int n,k;
    string S;
    cin>>n>>k;
    cin>>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';
    
    cout<<S<<endl;
    
    return 0;
}

Submission status: Runtime Error

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
print(type.join(S))

Submission status: Runtime Error

Solution code:
S = str(input())
li = [(i+j) for (i,j) in zip(S[::2],S[1::2])]
if int(li[0]) == 00 or int(li[1]) == 00:
    print('NA')
elif int(li[0]) <= 12 and int(li[1]) <= 12:
    print('AMBIGUOUS')
elif int(li[0]) >= 13 and int(li[1]) <= 12:
    print('YYMM')
elif int(li[0]) <= 12 and int(li[1]) >= 13:
    print('MMYY')
else:
    print('NA')

Submission status: Runtime Error

Solution code:
import base
import random

N = random.randint(1,51)
K = random.randint(1,N)
string = ["A","B","C"]
S_list = random.choices(string,k=N)

S_list[K] = S_list[K].lower()

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

Submission status: Runtime Error

Solution code:
ソースコード 

Copy
Copy
A=list(map(int,input().split()))
S=input()
S=S[0:(A[1]-1)]+S[A[1]-1].lower()+S[(A[1]+1):A[0]]
print(S)

Submission status: Runtime Error

Solution code:
hoge = input().split()
n = int(hoge[0])
k = int(hoge[1])
s = hoge[2]
new_s = s[:k-1] + s[k-1].lower() + s[k:]
print(new_s)

Submission status: Runtime Error

Solution code:
N, K =map(int, input().split())
S =""
for num in range(1,N+1):
    
    inmoji =str(input())
    if num == K:
        S += inmoji.lower()
    else:
        S +=inmoji
print(S)

Submission status: Runtime Error

Solution code:
a=input()
i=0
n=[]
while i<len(a):
  n.append(a[i])
  i+=1
pd=n[0]+n[1]
sd=n[2]+n[3]
pd=int(pd)
sd=int(sd)
if sd==0 and pd==0:
  print('NA')
elif pd>12:
  if sd>=1 and sd<=12:
    print('YYMM')
  elif sd>12:
    print('NA')
  elif sd<1:
    print('NA')
elif pd==0:
  if sd>12:
    print('NA')
  if sd>0 and sd<=12:
    print('YYMM')
elif pd<=12:
  if sd>12:
    print ('MMYY')
  elif sd==0:
    print('MMYY')
  elif sd<=12 and sd!=0:
    print('AMBIGUOUS')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
k = int(input())
s = input()

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

Submission status: Runtime Error

Solution code:
import sys
 
args = sys.argv
 
length = args[1]
focus = args[2]
abcs = args[3]
 
 
def change_upper_to_lower(str, num):
  
  before = str[:int(num) - 1]
  after = str[int(num):]

  if(str[int(num) - 1] == "A"):
    newstr = before + "a" + after
  elif(str[int(num) - 1] == "B"):
    newstr = before + "b" + after
  else:
    newstr = before + "c" + after
    
  return newstr
 
 
changed_abcs = change_upper_to_lower(abcs, focus)
 
print(changed_abcs)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K =map(int, input().split())
S =""
for num in range(N):
    
    inmoji =str(input())
    if num == K:
        S += inmoji.lower()
    else:
        S +=inmoji
print(S)

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

s =""
for num in range(N):
    
    inmoji =str(input())
    if num == K:
        s += inmoji.lower()
    else:
        s+=inmoji
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
 
args = sys.argv
 
length = args[1]
focus = args[2]
abcs = args[3]
 
 
def change_upper_to_lower(str, num):
  
  before = str[:int(num) - 1]
  print(before)
  after = str[int(num):]
  print(after)

  if(str[int(num) - 1] == "A"):
    newstr = before + "a" + after
  elif(str[int(num) - 1] == "B"):
    newstr = before + "b" + after
  else:
    newstr = before + "c" + after
    
  return newstr
 
 
changed_abcs = change_upper_to_lower(abcs, focus)
 
print(changed_abcs)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10 ** 5)
n = int(input())
color = [-1] * n
neighbor = [[] for _ in range(n)]
for _ in range(n - 1):
    u, v, w = tuple(map(int, input().split()))
    neighbor[u - 1].append((v-1, w))
    neighbor[v - 1].append((u-1, w))
def col(u, c):
    color[u] = c
    for v, w in neighbor[u]:
        if color[v] < 0:
            col(v, (c + w) % 2)
col(0, 0)
for i in range(n):
    print(color[i])

Submission status: Runtime Error

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

s = (input())

if s[k] is 'A':
	o = s[:k] + 'a' +s[k:] 
elif s[k] is 'B':
	o = s[:k] + 'b' +s[k:] 
elif s[k] is 'C':
	o = s[:k] + 'c' +s[k:] 

print(o)

Submission status: Runtime Error

Solution code:
import random

random.seed(a=1)
N = random.randint(1,51)
K = random.randint(1,N)
string = ["A","B","C"]
S_list = random.choices(string,k=N)

S_list[K] = S_list[K].lower()

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

Submission status: Runtime Error

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

str = S[K].lower()
S[K] = str

print(S)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
str = list(raw_input())
f = int(str[0]+str[1])
l = int(str[2]+str[3])
# 文字列の入力
ans = ""
if(f > 0 and 13 > f):
    if(l == 0):
        ans = "MMYY"
    if(l > 0 and 13 > l):
        ans = "AMBIGUOUS"
    if(l >= 13):
        ans= "MMYY"
elif(f == 0):
    if(l == 0):
        ans = "NA"
    if(l > 0 and 13> l):
        ans = "YYMM"
    if(l >= 13):
        ans= "NA"
elif(f>=13):
    if(l == 0):
        ans = "NA"
    if(l > 0 and 13> l):
        ans = "YYMM"
    if(l >= 13):
        ans= "NA"
 
print ans

Submission status: Runtime Error

Solution code:
import random

N = random.randint(1,51)
K = random.randint(1,N)
string = ["A","B","C"]
S_list = random.choices(string,k=N)

S_list[K] = S_list[K].lower()

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

Submission status: Runtime Error

Solution code:
A=list(map(int,input().split()))
S=input()
 
S(A(1)-1).lower()
print(S)

Submission status: Runtime Error

Solution code:

n, k = input().split()
#k = input()
s = input()

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

b = s[:k-1]

a = s[k:]

new_s = b + word + a

print(new_s)

Submission status: Runtime Error

Solution code:
V\#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
print(type.join(S))

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
str = list(raw_input())
f = int(str[0]+str[1])
l = int(str[2]+str[3])
# 文字列の入力
if(f == 0):
    if(l == 0):
        ans = "NA"
    if(l > 0 and 13> l):
        ans = "YYMM"
    if(l >= 13):
        ans= "NA"
elif(f > 0 and 13 > f):
    if(l == 0):
        ans = "MMYY"
    if(l > 0 and 13 > l):
        ans = "AMBIGUOUS"
    if(l >= 13):
        ans= "MMYY"
elif(f >= 13):
    if(l == 0):
        ans = "NA"
    if(l > 0 and 13> l):
        ans = "YYMM"
    if(l >= 13):
        ans= "NA"

print ans

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import types

# Input
l = list(map(int, input().split()))
_ = l[0]
K = l[1] - 1 # <---!!

#S = list(map(str, input().split()))
S = list(input())

# Process
if K == 0:
    left = list("")
else:
    left = S[:K]

if K == len(S)-1:
    right = ("")
else:
    right = S[K+1:]

output = left + list(str(S[K]).lower()) + right
print( ''.join(output) )

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
aa=int(s[:2])
bb=int(s[3:])
if 0<aa<=12 and 0<bb<=12: ans='AMBIGUOUS'
elif 0<bb<=12: ans='YYMM'
elif 0<aa<=12: ans='MMYY'
else: ans='NA'
print(ans)

Submission status: Runtime Error

Solution code:

n = input()
k = input()
s = input()

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

b = s[:k-1]

a = s[k:]

new_s = b + word + a

print(new_s)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
str = list(raw_input())
f = int(str[0]+str[1])
l = int(str[2]+str[3])
# 文字列の入力
if(f == 0):
    if(l == 0):
        ans = "NA"
    if(l > 0 and 13> l):
        ans = "YYMM"
    if(l >= 13):
        ans= "NA"
elif(f > 0 and 13 > f):
    if(l == 0):
        ans = "MMYY"
    if(l > 0 and 13 > l):
        ans = "AMBIGUOUS"
    if(l >= 13):
        ans= "MMYY"
elif(f >= 13):
    if(l == 0):
        ans = "NA"
    if(l > 0 and 13> l):
        ans = "YYMM"
    if(l >= 13):
        ans= "NA"

print ans
# 出力

Submission status: Runtime Error

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

Submission status: Runtime Error

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

S(A(1)-1).lower()
print(''.join(S))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
s=input()
for i in n:
	if i==k:
        if i=='A':
            i='a'
        elif i=='B':
            i='b'
        elif i=='C':
            i='c'        
print(i)

Submission status: Runtime Error

Solution code:

n = input()
k = input()
s = input()

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

b = s[:k-1]

a = s[k:]

new_s = b + word + a

print(new_s)

Submission status: Runtime Error

Solution code:
import base
import random

N = random.randint(1,51)
K = random.randint(1,N)
string = ["A","B","C"]
S_list = random.choices(string,k=N)

if S_list[K] == "A":
    S_list[K] = "a"
elif S_list[K] == "B":
    S_list[K] = "b"
else:
    S_list[K] = "c"

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

Submission status: Runtime Error

Solution code:
import sys
 
args = sys.argv
 
length = args[1]
focus = args[2]
abcs = args[3]
 
 
def change_upper_to_lower(str, num):
  if(str[int(num)] == "A"):
    str[int(num)] = "a"
  elif(str[int(num)] == "B"):
    str[int(num)] = "b"
  else:
    str[int(num)] = "c"
    
  return str
 
 
changed_abcs = change_upper_to_lower(abcs, focus)
 
print(changed_abcs)

Submission status: Runtime Error

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

sa = ""
for i in range(len(S)):
  if S[i] == S[int(K)]:
    sa = sa + str(S[i].lower())
  else:
    sa = sa + str(S[i])
print(sa)

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

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

length = args[1]
focus = args[2]
abcs = args[3]


def change_upper_to_lower(str, num):
  if(str[int(num)] == "A"):
    str[int(num)] == "a"
  elif(str[int(num)] == "B"):
    str[int(num)] == "b"
  else:
    str[int(num)] == "c"
    
  return str


changed_abcs = change_upper_to_lower(abcs, focus)

print(changed_abcs)

Submission status: Runtime Error

Solution code:
s = range(n)
s = s.lower(k)
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import random

N = random.randint(1,51)
K = random.randint(1,N)
string = ["A","B","C"]
S_list = random.choices(string,k=N)

if S_list[K] == "A":
    S_list[K] = "a"
elif S_list[K] == "B":
    S_list[K] = "b"
else:
    S_list[K] = "c"

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

Submission status: Runtime Error

Solution code:
s = list(1:n)
s = s.lower(k)
print(s)

Submission status: Runtime Error

Solution code:
import sys

stdin = sys.stdin

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

n,k = na()
s=ns()
print(s.replace(s[k+1],s[k+1].lower()))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(1:n)
s = str(s[k])
s = s.lower()
print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import random

N = random.randint(1,51)
K = random.randint(1,N)
string = ["A","B","C"]
S_list = random.choices(string,k=N)

if S_list[K] == "A":
    S_list[K] = "a"
elif S_list[K] == "B":
    S_list[K] = "b"
else:
    S_list[K] = "c"

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

Submission status: Runtime Error

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

if s[k] is 'A':
	s[k] = 'a'
elif s[k] is 'B':
	s[k] = 'b'
elif s[k] is 'C':
	s[k] = 'c'

print(s)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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"
print(a)

Submission status: Runtime Error

Solution code:
import sys
 
args = sys.argv
 
length = args[1]
focus = args[2]
abcs = args[3]
 
def change_upper_to_lower(str, num):
  if(str[num] == "A"):
    str[num] == "a"
  elif(str[num] == "B"):
    str[num] == "b"
  else:
    str[num] == "c"
    
change_upper_to_lower(abcs, focus)
 
print(abcs)

Submission status: Runtime Error

Solution code:
x=input()
aa=x[:2]
bb=x[3:]
aa=int(aa)
bb=int(bb)
if 0<aa<=12 and 0==bb:
	print("MMYY")
elif 0==aa and 0<bb<=12:
	print("YYMM")
elif 0<aa<=12 and 0<bb<=12:
	print("AMBIGUOUS")
elif 0<aa<=12:
	print("MMYY")
elif 0<bb<=12:
	print("YYMM")
else:
	print("NA")

Submission status: Runtime Error

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

print(s)

Submission status: Runtime Error

Solution code:
S=input()
K=input()
 
char_list = S.split()
char_list[K] = char_list[K].lower()
 
S = ''.join(char_list)
  
print(S)

Submission status: Runtime Error

Solution code:
s=input()

a,b=int(s[0]+s[1]),int(s[2]+s[3])

if b==0:
    print('NA')
elif a==0:
    print('NA')
elif a>12:
    if b>12:
        print('NA')
    elif 0<b<13:
        print('YYMM')
elif 0<a<13:
    if b>12:
        print('MMYY')
    elif 0<b<13:
        print('AMBIGUOUS')

Submission status: Runtime Error

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

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:
for s in range(n):
    s = str(s[k])
    s = s.lower()

print(s)

Submission status: Runtime Error

Solution code:
i = int(input().split()[1])
s = input()
print("{}{}{}".format(s[:i], s[i].lower(), s[i+1:]))

Submission status: Runtime Error

Solution code:
x=input()
aa=x[:2]
bb=x[3:]
aa=int(aa)
bb=int(bb)
if 0<aa<=12 and bb==0:
	print("MMYY")
elif aa==0 and 0<bb<=12:
	print("YYMM")
elif 0<aa<=12 and 0<bb<=12:
	print("AMBIGUOUS")
elif 0<aa<=12:
	print("MMYY")
elif 0<bb<=12:
	print("YYMM")
else:
	print("NA")

Submission status: Runtime Error

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

S = str(input())

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

print(S)

Submission status: Runtime Error

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

S[K+1] = S[K+1].lower()
for i in range(N):
    S_ += S[i]

print(S_)

Submission status: Runtime Error

Solution code:
import sys
 
args = sys.argv
 
length = arg[1]
focus = int(arg[2])
abcs = arg[3]
 
def change_upper_to_lower(str, num):
  if(str[num] == "A"):
    str[num] == "a"
  elif(str[num] == "B"):
    str[num] == "b"
  else:
    str[num] == "c"
    
change_upper_to_lower(abcs, focus)
 
print(abcs)

Submission status: Runtime Error

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

if (S[K-1] == "A"):
  S[K] = "a"
elif (S[K-1] == "B"):
  S[K] = "b"
elif (S[K-1] == "C"):
  S[K] = "c"
  
ans = ','.join(S)
    
print(ans)

Submission status: Runtime Error

Solution code:
S=input()
if 1<=int(S[:2])<=12 and 13<=int(S[2:]) or int(S[2:])==0:
    print("MMYY")
elif 1<=int(S[2:])<=12 and 13<=int(S[:2]) or int(S[:2])==0:
    print("YYMM")
elif 1<=int(S[2:])<=12 and 1<=int(S[:2])<=12:
    print("AMBIGUOUS")2
elif 13<=int(S[2:]) or int(S[2:])==0 and 13<=int(S[:2]) or int(S[:])==0:
    print("NA")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

print(n)
print(k)
print(s)

Submission status: Runtime Error

Solution code:
s = list(n)
up = str(s[k])
s = up.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[n].lower()
elif k == 1:
    r=s[0].lower() + s[1:n]
else:
    r=s[0:(k-1)] + s[k-1].lower() + s[k:n]
print(r)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if s[k] is 'A'
	s[k] = 'a'
elif s[k] is 'B'
	s[k] = 'b'
elif s[k] is 'C'
	s[k] = 'c'

print(s)

Submission status: Runtime Error

Solution code:
S=input()
K=input()
 
char_list = list(S)
char_list[K] = char_list[K].lower()

S = ','.join(char_list)
  
print(S)

Submission status: Runtime Error

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

S = str(input())

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

print(S)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(input())

t = input()

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

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

length = arg[1]
focus = arg[2]
abcs = arg[3]

def change_upper_to_lower(str, num):
  if(str[num] == "A"):
    str[num] == "a"
  elif(str[num] == "B"):
    str[num] == "b"
  else:
    str[num] == "c"
    
change_upper_to_lower(abcs, focus)

print(abcs)

Submission status: Runtime Error

Solution code:
x=input()
aa=x[:2]
bb=x[3:]
aa=int(aa)
bb=int(bb)
if 0<aa<=12 and bb==0:
	print("MMYY")
if aa==0 and 0<bb<=12:
	print("YYMM")
if 0<aa<=12 and 0<bb<=12:
	print("AMBIGUOUS")
elif 0<aa<=12:
	print("MMYY")
elif 0<bb<=12:
	print("YYMM")
else:
	print("NA")

Submission status: Runtime Error

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

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

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-1].lower()

print("".join(s))