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 = map(int, input().split())
S = 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: 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"
elif S[K] == "C":
    S[K] = "c"

print(S)

Submission status: Runtime Error

Solution code:
s=list(input())
k=int(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=input()
k=int(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=input()
k=int(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:
n, k = [int(s) for s in input().split()]
s = input()

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

Submission status: Runtime Error

Solution code:
n, k = [int(s) for s in 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=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 = int(input())

if 0 < S // 100 <= 12 and 0 < S % 100<= 12:
    print("AMBIGUOUS")
elif 0 < S // 100 <= 12:
    print("MMYY")
elif 0 < S % 100 <= 12:
    print("YYMM")
else :
    print("NA")

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
import math
s=0
if N-K>=0:
  N-=(N-K+1)
for j in range(1,N+1):
  if (K/j)%2==0:
    s+=math.log(K//j,2)
  else:
    s+=int(math.log(K/j),2)+1
print(float(N/(s+N)))

Submission status: Runtime Error

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

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

print(s)

Submission status: Runtime Error

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

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

S[K] = S[K].lower()
S_out = "".join(S)
print(S_out)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(80000)

n=int(input())
visitedlist=[-1 for  i in range(n)]
kilist=[[] for i in range(n)]
anslist=[0 for i in range(n)]
searchedlist=[-1 for i in range(n)]
for i in range(n-1):
        a,b,c=map(int,input().split())
        kilist[a-1].append((b,c))
        kilist[b-1].append((a,c))
def search(i):
        searchedlist[i-1]=1
        visitedlist[i-1]=1
        flag=0
        for j in kilist[i-1]:
            if visitedlist[j[0]-1]<0:
                visitedlist[j[0]-1]=1
                flag+=1
                anslist[j[0]-1]=anslist[i-1]+j[1]
        else:
            pass

        if flag>0:    
            for k in kilist[i-1]:
                if searchedlist[k[0]-1]==-1:
                    search(k[0])
search(2)
for i in anslist:
    print(i%2)

Submission status: Runtime Error

Solution code:
#d-even relation
#ふかさ優先探索の実装
#再起関数の実装を行う
n=int(input())
visitedlist=[-1 for  i in range(n)]
lists=[tuple(map(int,input().split())) for i in range(n-1)]
kilist=[[] for i in range(n)]
for i in lists:
    kilist[i[0]-1].append(i[1:])
    kilist[i[1]-1].append(i[0:3:2])
visitedlist[0]=1
anslist=[0 for i in range(n)]
#開始地点1のところは0を基準としている
#1には初めに訪れる
def search(i):
        flag=False
        for j in kilist[i-1]:
            if visitedlist[j[0]-1]<0:
                visitedlist[j[0]-1]=1
                flag=True
                if j[1]%2==0:
                    anslist[j[0]-1]=anslist[i-1]
                elif j[1]%2!=0:
                    anslist[j[0]-1]=1-anslist[i-1]      
            else:
                pass  
        if flag:    
            for j in kilist[i-1]:
                return search(j[0])
        if not flag:
            pass
            
search(1)
for k in anslist:
    print(k)

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;

long long N, K;
string S;

int main(){
	cin >> N >> K;
	cin >> S;
	S[K-1] = S[K-1] - ('A' - 'a');
	cout << S << endl;
}

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

s1=s[:k+1]
s2=s[k+1]
s3=s[k+2:]

if s2=="A":
    s2="a"
elif s2=="B":
    s2="b"
else:
    s2="c"

print(s1+s2+s3)

Submission status: Runtime Error

Solution code:
n=input()
i=0
a=int(n[0]+n[1], 10)
b=int(n[2]+n[3],10)
if a==0 or b==0:
  print('NA')
elif a<13 and b<13:
  print('AMBIGUOUS')
elif b<13:
  print('YYMM')
elif a<13:
  print('MMYY')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n, k =map(int,input().split())
s = input()
x = s[k-1]
if x == "A":
  s[k-1] = "a"
elif x == "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-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:
n,k = [int(x) for x in input().split()]
s = input()

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

Submission status: Runtime Error

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

s[k].lower()

print(s)

Submission status: Runtime Error

Solution code:
import sys
n=int(input())
if n==1:
    print(0)
    sys.exit()
lst=[list(map(int,input().split())) for _ in range(n-1)]
data=[[] for i in range(n+1)]
for i in range(n-1):
    u,v,w=lst[i]
    data[u].append(i)
    data[v].append(i)
flag=[-1]*(n+1)
u,v,w=lst[0]
flag[u]=0
flag[v]=(flag[u]+w)%2
que=[data[u],data[v]]
while que:
    h=que.pop()
    for k in h:
        u,v,w=lst[k]
        if flag[u]!=-1 and flag[v]!=-1:
            continue
        else:
            if flag[u]!=-1:
                flag[v]=(flag[u]+w)%2
                que.append(data[v])
            else:
                flag[u]=(flag[v]+w)%2
                que.append(data[u])
for i in range(1,n+1):
    print(flag[i])

Submission status: Runtime Error

Solution code:
N = int(input(""))
K = int(input(""))
S = input('')
s = S[K-1]
o = s.lower()
t=S.replace(s[K-1],o,K)
    
print(t)

Submission status: Runtime Error

Solution code:
N = int(input(""))
S = input('')
K = int(input(""))
s = S[K-1]
o = s.lower()
t=S.replace(s[K-1],o,K)
    
print(t)

Submission status: Runtime Error

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

s = S[K-1]
o = s.lower()
s1 = S.replace(s,o,K)
    
print(s1)

Submission status: Runtime Error

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

s = S[K-1]
o = s.lower()
print(o)
s1 = S.replace(s,o,K)
    
print(s1)

Submission status: Runtime Error

Solution code:
N = int(input(""))
K = int(input(""))
t = []
S = ''
for i in range(N):
    t = t +[input("")]
s = t[K-1]
o = s.lower()
t[b-1]=o
for x in t:
    S += x
    
print(S)

Submission status: Runtime Error

Solution code:
a = int(input(""))
b = int(input(""))
t = []
p = ''
for i in range(a):
    t = t +[input("")]
s = t[b-1]
o = s.lower()
t[b-1]=o
for x in t:
    p += x
    
print(p)

Submission status: Runtime Error

Solution code:
a = int(input(""))
b = int(input(""))
t = []
p = ''
for i in range(a):
    t = t +[input("")]
s = t[b-1]
o = s.lower()
print(o)
t[b-1]=o
for x in t:
    p += x
    
print(p)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

s = [val for val in s]

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

print("".join(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(a)

Submission status: Runtime Error

Solution code:
using System;
using System.Collections.Generic;
using System.Linq;

namespace paiza
{
    class Program
    {
        static void Main(string[] args)
        {
            var NK = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            var S = Console.ReadLine();

            foreach (var (c, i) in S.Select((x, i) => (x, i)))
            {
                Console.Write(i + 1 == NK[1] ? c.ToString().ToLower() : c.ToString());
            }
            Console.WriteLine();
            //    var xai = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            //    var N = int.Parse(Console.ReadLine());

            //    var p = new int[N];
            //    foreach (var i in Enumerable.Range(0, N))
            //    {
            //        p[i] = int.Parse(Console.ReadLine());
            //    }

            //    var reverses = new Dictionary<int, int>();

            //    for (var i = 0; i < 6; i++)
            //    {
            //        if (i % 2 == 0)
            //        {
            //            reverses.Add(xai[i], xai[i + 1]);
            //        }
            //        else
            //        {
            //            reverses.Add(xai[i], xai[i - 1]);
            //        }
            //    }

            //    var point = 0;
            //    var number = p[0];

            //    for (var i = 0; i < N - 1; i++)
            //    {
            //        if (reverses[number] == p[i + 1])
            //        {
            //            point += 2;
            //        }
            //        else if (number == p[i + 1])
            //        {

            //        }
            //        else
            //        {
            //            point += 1;
            //        }
            //        number = p[i + 1];
            //    }

            //    Console.WriteLine(point);
            //}
        }
    }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if (s[k-1] =="A"):
  s[k] = "a"
  s=input()
  print(s)
  
else if (s[k-1] == "B"):
  s[k] = "b"
  s=input()
  print(s)
else :
  s[k-1] = "c"
  s=input()
  print(s)

Submission status: Runtime Error

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

if (s[k] =="A"):
  s[k] = "a"
  print(s)
  
else if (s[k] == "B"):
  s[k] = "b"
  print(s)
else :
  s[k] = "c"
  print(s)

Submission status: Runtime Error

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

if (s[k] =="A"):
  s[k] = "a"
  
else if (s[k] == "B"):
  s[k] = "b"
  
else :
  s[k] = "c"

Submission status: Runtime Error

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

Submission status: Runtime Error

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

#K番目の文字を小文字に変える
S[K-1] = S[K-1].lower()

#リストを文字列に変換する
answer = ''.join(replace)

print(answer)

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'
else:
    S[K-1] = 'c'
print(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()
print(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-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 = 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())
s=list(input())
s[k-1]=s[k-1].lower()
print(''.join(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
s=str(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:
m,k = map(int, input().split())
s = input()
s = s[:k] + s[k].lower() + s[k+1:]
print(s)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
graph = [[] for _ in range(N)]

for i in range(N-1):
    u, v, w = map(int, input().split())
    graph[u-1].append((v-1, w))
    graph[v-1].append((u-1, w))
# これによって木が定義できた
# print(graph)

flag = [None for _ in range(N)]  # まだどの頂点も探索していない


def k(v, distance):  # distanceは0or1
    flag[v] = distance  # 最初は0

    for next_v, w in graph[v]:
        if flag[next_v] == 1 or flag[next_v] == 0:  # 到達済み（親）であればcontinue
            continue
        if (w % 2) == 0:  # そのノードへの距離が偶数であればそのまま（最初は0なので）
            k(next_v, distance)
        else:
            k(next_v, 1-distance)


k(0, 0)  # 親を強制的に決めてよい, この場合は0のノードを親にしている
for i in range(N):
    print(int(flag[i]))

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:

a,b=map(int,input().split())
s=input()

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

Submission status: Runtime Error

Solution code:
lst = list(input())
lst1 = []
lst1.append(lst[0]+lst[1])
lst1.append(lst[2]+lst[3])

if (int(lst1[0]) >=13 and int(lst1[1]) >=13) or (int(lst1[0]) >=13 and lst1[1] =="00") or (lst1[0] =="00" and int(lst1[1]) >=13) or (lst1[0] =="00" and lst1[1] == "00"):
  print("NA")
  
elif (0<int(lst1[0])<=12 and 0<int(lst1[1])<=12):
      print("AMBIGUOUS")
      
elif 0<int(lst1[0]) <=12 and int(lst1[1])>=13:
      print("MMYY")
elif 0<int(lst1[1])<=12 and int(lst1[0])>=13:
      print("YYMM")

Submission status: Runtime Error

Solution code:
lst = list(input())
lst1 = []
lst1.append(lst[0]+lst[1])
lst1.append(lst[2]+lst[3])

if (int(lst1[0]) >=13 and int(lst1[1]) >=13) or (int(lst1[0]) >=13 and lst1[1] =="00") or (lst1[0] =="00" and lst1[1] >=13):
  print("NA")
  
elif (0<int(lst1[0])<=12 and 0<int(lst1[1])<=12):
      print("AMBIGUOUS")
      
elif 0<int(lst1[0]) <=12 and int(lst1[1])>=13:
      print("MMYY")
elif 0<int(lst1[1])<=12 and int(lst1[0])>=13:
      print("YYMM")

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()
upper = {
    'A': 'a',
    'B': 'b',
    'C': 'c',
}
print(s[:k] + upper[s[k]] + s[k+1:])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

S = input()
S[B] = S[B].lowercase()

print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(s.replace('s[k-1]', ''s[k-1]'.lower()')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# n, k: 数値　s: 文字列　が与えられる
# k文字目を入れ替えよ

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

# dic = {"A":"a", "B":"b", "C":"c"}

# キーとなる文字　文字列のインデックスは0から
# s[k-1]


# 小文字にする表現がある 下記なら1発
print(s[:k-1] + s[k-i].lower() + s[k:])

# [開始インデックス:終了インデックス] 数値は　より大　と　未満
# print(s[:k-1] + dic.get(s[k-1]) + s[k-1:])

Submission status: Runtime Error

Solution code:
# n, k: 数値　s: 文字列　が与えられる
# k文字目を入れ替えよ

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

dic = {"A":"a", "B":"b", "C":"c"}

# キーとなる文字　文字列のインデックスは0から
# s[k-1]


# 小文字にする表現がある 下記なら1発
print(s[:k-1] + s[k-i].lower() + s[k-1:])

# [開始インデックス:終了インデックス] 数値は　より大　と　未満
# print(s[:k-1] + dic.get(s[k-1]) + s[k-1:])

Submission status: Runtime Error

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

    # 小文字にする表現がある 下記なら1発
    print(s[:k-1] + s[k-1].lower() + s[k:])

Submission status: Runtime Error

Solution code:
    # n, k: 数値　s: 文字列　が与えられる
    # k文字目を入れ替えよ

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

    #dic = {"A":"a", "B":"b", "C":"c"}

    # キーとなる文字　文字列のインデックスは0から
    # s[k-1]


    # 小文字にする表現がある 下記なら1発
    print(s[:k-1] + s[k-1].lower() + s[k-1:])

    # [開始インデックス:終了インデックス] 数値は　より大　と　未満
    # print(s[:k-1] + dic.get(s[k-1]) + s[k-1:])

Submission status: Runtime Error

Solution code:
    # n, k: 数値　s: 文字列　が与えられる
    # k文字目を入れ替えよ

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

    #dic = {"A":"a", "B":"b", "C":"c"}

    # キーとなる文字　文字列のインデックスは0から
    # s[k-1]


    # 小文字にする表現がある 下記なら1発
    print(s[:k-1] + s[k-1].lower() + s[k:])

    # [開始インデックス:終了インデックス] 数値は　より大　と　未満
    # print(s[:k-1] + dic.get(s[k-1]) + s[k-1:])

Submission status: Runtime Error

Solution code:
    # n, k: 数値　s: 文字列　が与えられる
    # k文字目を入れ替えよ

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

    # dic = {"A":"a", "B":"b", "C":"c"}

    # キーとなる文字　文字列のインデックスは0から
    # s[k-1]


    # 小文字にする表現がある 下記なら1発
    print(s[:k-1] + s[k-i].lower() + s[k:])

    # [開始インデックス:終了インデックス] 数値は　より大　と　未満
    # print(s[:k-1] + dic.get(s[k-1]) + s[k-1:])

Submission status: Runtime Error

Solution code:
    # n, k: 数値　s: 文字列　が与えられる
    # k文字目を入れ替えよ

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

    # dic = {"A":"a", "B":"b", "C":"c"}

    # キーとなる文字　文字列のインデックスは0から
    # s[k-1]


    # 小文字にする表現がある 下記なら1発
    print(s[:k-1] + s[k-i].lower() + s[k-1:])

    # [開始インデックス:終了インデックス] 数値は　より大　と　未満
    # print(s[:k-1] + dic.get(s[k-1]) + s[k-1:])

Submission status: Runtime Error

Solution code:
    # n, k: 数値　s: 文字列　が与えられる
    # k文字目を入れ替えよ

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

    dic = {"A":"a", "B":"b", "C":"c"}

    # キーとなる文字　文字列のインデックスは0から
    # s[k-1]


    # 小文字にする表現がある 下記なら1発
    print(s[:k-1] + s[k-i].lower() + s[k-1:])

    # [開始インデックス:終了インデックス] 数値は　より大　と　未満
    # print(s[:k-1] + dic.get(s[k-1]) + s[k-1:])

Submission status: Runtime Error

Solution code:
# n, k: 数値　s: 文字列　が与えられる
# k文字目を入れ替えよ

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

dic = {"A":"a", "B":"b", "C":"c"}

# キーとなる文字　文字列のインデックスは0から
# s[k-1]

# 小文字にする表現がある
# print(s[:k] + )

# [開始インデックス:終了インデックス] 数値は　より大　と　未満
print(s[:k-1] + dic.get("s[k-1]") + s[k-1:])

Submission status: Runtime Error

Solution code:
# n, k: 数値　s: 文字列　が与えられる
# k文字目を入れ替えよ

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

dic = {"A":"a", "B":"b", "C":"c"}

# キーとなる文字　文字列のインデックスは0から
# s[k-1]

# 小文字にする表現がある
# print(s[:k] + )

# [開始インデックス:終了インデックス] 数値は　より大　と　未満
print(s[:k-1] + dic.get("{s[k-1]}") + s[k-1:])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from collections import defaultdict
import sys
sys.setrecursionlimit(10**7)

n = int(input())
seen = [-1]*(n+1)
path = defaultdict(dict)

for _ in range(n-1):
    u, v, w = map(int, input().split())
    path[u][v] = w
    path[v][u] = w


def dfs(seen, pos, color):
    if seen[pos] != -1:
        return
    else:
        seen[pos] = color
        change_color = 1 - color
        for nx in path[pos].keys():
            check = path[pos][nx]
            if check % 2 == 1:
                dfs(seen, nx, change_color)
            dfs(seen, nx, color)


dfs(seen, 1, 0)
for i in range(1, n+1):
    print(seen[i])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,K=input().split()
S=input()
S[K].swapcase()
print(S)

Submission status: Runtime Error

Solution code:
N,K=input().split()
S=input()
S[K+1].swapcase()
print(S)

Submission status: Runtime Error

Solution code:
data=list(input())
a=10*int(data[0])+int(data[1])
b=10*int(data[2])+int(data[3])

if (a==0 and 1<=b<=12)or (a>=13 and 1<=b<=12):
    print ("YYMM")
elif (b==0 and 1<=b<=12) or (b>=13 and 1<=a<=12):
    print("MMYY")
elif  0<=a<=12 and 0<=b<=12:
    print("AMBIGUOUS")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
data=list(input())
a=10*int(data[0])+int(data[1])
b=10*int(data[2])+int(data[3])
if a==0 or b==0:
    print("NA")
elif a>12 and b>12:
    print("NA")
elif 0<a<=12 and 0<b<=12:
    print('AMBIGUOUS')
elif 0<a<=12 and  12<b:
    print("MMYY")
elif 0<b<=12 and 12<a:
    print("YYMM")

Submission status: Runtime Error

Solution code:
data=list(input())
a=10*int(data[0])+int(data[1])
b=10*int(data[2])+int(data[3])
if a==00 or b==00:
    print("NA")
elif a>12 and b>12:
    print("NA")
elif 0<a<=12 and 0<b<=12:
    print('AMBIGUOUS')
elif 0<a<=12 and  12<b:
    print("MMYY")
elif 0<b<=12 and 12<a:
    print("YYMM")

Submission status: Runtime Error

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

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

print(S)

Submission status: Runtime Error

Solution code:

inputa = input().split()

inputb = input()


a = int(inputa[0])
b = int(inputa[1])
# c = int(input[2])

inputList = list(inputb)

inputList[b] = inputList[b-1].lower()

ans = "".join(inputList)

print(ans)

# inputList.sort()
#
# list = [a+b, b+c ,c+a]
#
# ans = min(list)
# print(ans)



# flg = 1
# for i in range(0, len(inputList)-1):
#     if inputList[i] == inputList[i + 1]:
#         flg = 0
#         break
#
# if flg == 0:
#     print("Bad")
# else:
#     print("Good")

Submission status: Runtime Error

Solution code:
# スペース区切りの整数の入力
b, c = map(int, input().split())
# 文字列の入力
s = input()
# 出力
print(s.lower(c))

Submission status: Runtime Error

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

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

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:
n,k=map(int,input().split())
l=[i for i in str(input())]

l[k]=l[k].lower()

print(''.join(l))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,K=(int(x) for x in range(input().split()))
S=input()
print(S.replace(S[K-1],S[K-1].lower()))

Submission status: Runtime Error

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

s[K].lower()
print(s)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = str(input()) 

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

Submission status: Runtime Error

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

k_lower = s.lower(k-1)
print(k_lower)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,K=(int(x) for x in input().split())
S=list(int(i) for i in input())
S[K-1] = S[K-1].lower()
print(' '.join(S))

Submission status: Runtime Error

Solution code:
N,K=(int(x) for x in input().split())
S=list(int(i) for i in input())
S[K-1] = S[K-1].lower()
print(','.join(S))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#coding : utf-8　

import os
import sys

N, K = map(lambda x: int(x), input().split(" "))
S = input()

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

print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(input())
a = int(s[0]+s[1])
b = int(s[2]+s[3])
if 0<a<13 and 0<b<13:
    print('AMBIGUOUS')
elif 0<a<13:
    print('MMYY')
elif 0<b<13:
    print('YYMM')
else:
    print('NA')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

n,k=map(int,input().split())
s=input()
s = s[:k-1]+str(s[k]).lower()+s[k+1:]
print(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 = list(map(int, input().split()))
s = input()
s[k-1] = s[k-1].upper()
print(s)

Submission status: Runtime Error

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

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