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:
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
#include <complex>
#include <array>
#include <functional>
#include <stack>
#include <iomanip>
#include <limits>
using namespace std;
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<double> VD;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef vector<VD> VVD;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
using Graph=vector<vector<int>>;
using edge= struct{int to;ll cost;};


template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}
using Graph =vector<vector<int>>;
//A 65
//a 97


int main(){
  int N,K;cin>>N>>K;
  string S;cin>>S;
  S[K-1]=S[K-1]+32;
  cout<<S<<endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int,input(4)
k=int,input(3)
s=input(CABA)
S=s[0:k-1]+s[k-1].lower()+s[k:]
print(S)

Submission status: Runtime Error

Solution code:
n=int,input(4)
k=int,input(3)
s=input(CABA)
S='s[0:k-2]'+'s[k-1].swapcase()'+'s[k:]'
print(S)

Submission status: Runtime Error

Solution code:
n=int,input()
k=int,input()
s=input()
S='s[0:k-2]'+'s[k-1].swapcase()'+'s[k:n]'
print(S)

Submission status: Runtime Error

Solution code:
_, k, s = map(int, open(0).read().split())
s[k-1] = chr(ord(s[k-1])+26)
print(s)

Submission status: Runtime Error

Solution code:
_, k, s = map(int, open(0).read().split())
s[k-1] ==chr(ord(s[k-1])+26)
print(s)

Submission status: Runtime Error

Solution code:
_, k, s = map(int, open(0).read().split())
s[k-1] == chr(ord(s[k-1])+26)
print(s)

Submission status: Runtime Error

Solution code:
k,n=input().split()
n=int(n)
k=int(k)
s=input()
n=n-1
print(f"{s[:n]}{chr(ord(s[n])+32)}{s[n+1:]}")

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(s,end='' for i in range(n))

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 = list(input())
s[k].lower()
for i in range(n):
  print(s[k], end="")

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 = [int(x) for x in input().split()]
s = input()
print(s[:k-1]+s[k].lower()+s[k+1:])

Submission status: Runtime Error

Solution code:
c=0
def doublet(n,f):
    global c
    if n<f:
        c=c+1
        return doublet(2*n,f)
    else:
        return c
num=int(input())
k=int(input())
if (num>=1 and num<=10**5) and (k>=1 and k<=10**5):
    sum_power=0.0
    for i in range(1,(num+1),1):
        count=doublet(i,k)
        p=pow(2,count)*num
        sum_power=sum_power+(1/p)
        c=0
    print(sum_power)

Submission status: Runtime Error

Solution code:
S = int(input())

f = S // 100
b = S % 100

if 1 <= f <= 12:
	if b <= 12:
		print("AMBIGUOUS")
	else:
		print("MMYY")
else:
	if 1 <= b <= 12:
		print("YYMM")
	else:
		print("NA")

Submission status: Runtime Error

Solution code:
S = int(input())

f = S // 100
b = S % 100

if f <= 12:
	if b <= 12:
		print("AMBIGUOUS")
	else:
		print("MMYY")
else:
	if b <=12:
		print("YYMM")
	else:
		print("NA")

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-1] = s[k-1].lower()

print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(''.json(S))

Submission status: Runtime Error

Solution code:
# 文字列のリストとして受け取りので、高階関数mapでint関数を各要素に適用
N, K = map(int, input().split())
# 入力される文字列を、文字のリストに変換する
S = list(input())

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

print(''.json(S))

Submission status: Runtime Error

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

S = input()

SL = list(S)
SL[K] = SL[K].lower()
ans = "".join(SL)

print(ans)

Submission status: Runtime Error

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

S = input()

SL = list(S)
SL[K] = SL[K].lower()
ans = "".join(SL)

print(ans)

Submission status: Runtime Error

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

SL[K] = SL[K].lower()
answer = "".join(SL)
print(answer)

Submission status: Runtime Error

Solution code:
n=int(input())
tree=[[]for _ in range(n+1)]
for _ in range(n-1):
    u,v,w=map(int,input().split())
    tree[u].append([v,w])
    tree[v].append([u,w])
d=[-1]*(n+1)
d[1]=0
q=[1]
while q:
    now=q.pop()
    for n_i,n_l in tree[now]:
        if d[n_i]==-1:
            d[n_i]=d[now]+[n_l]
            q.append(n_i)
for l in d[1:]:
    print(l%2)

Submission status: Runtime Error

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

S[K] -= 26

print(S)

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
S = str(input())
SA = list(S)
D = ["a" , "b" , "c"]

if SA[M] == "A":
    SA[M] = D[0]
elif SA[M] == "B":
    SA[M] = D[1]
elif SA[M] == "C"
    SA[M] = D[2]

M = ''.join(SA)

print(M)

Submission status: Runtime Error

Solution code:
N,M = map(int,input().split())
S = str(input())
SA = list(S)
D = ["a" , "b" , "c"]

if SA[M] == "A":
    SA[M] = D[0]
elif SA[M] == "B":
    SA[M] = D[1]
else:
    SA[M] = D[2]

M = ''.join(SA)

print(M)

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
    n, k = map(int, input().split())
    ans = input()

    if n ==1:
        ans = ans.lower()
    elif n==2:
        if k == 1:
            ans = ans[0].lower() + ans[1]
        else:
            ans = ans[0]+ ans[1].lower()

    else:
        if k == 1:
            ans = ans[0].lower() + ans[1:n]
        elif k == n:
            ans = ans[0:n-1] + ans[n].lower()
        else:
            ans = ans[0:k - 1] + ans[k - 1].lower() + ans[k:n]

    print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = list(input())
head = int(s[0] + s[1])
tail = int(s[2] + s[3])

if (0 < head < 13) and (0 < tail < 13):
    print('AMBIGUOUS')
elif 0 < tail < 13:
    print('YYMM')
elif 0 < head < 13:
    print('MMYY')
else:
    print('NA')

Submission status: Runtime Error

Solution code:
s = list(input())
head = int(s[0] + s[1])
tail = int(s[2] + s[3])
if (head == 0 or 12 < head < 100) and (0 < tail < 13): #YYは00も含む
    print('YYMM')
elif (0 < head < 13) and (tail == 0 or 12 < tail < 100):
    print('MMYY')
elif (0 < head < 13) and (0 < tail < 13):
    print('AMBIGUOUS')
else:
    print('NA')

Submission status: Runtime Error

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

for i in range(65, 65+26):
    if S[K]==chr(i):
        S[K]=chr(i+32)

print(''.join(S))

Submission status: Runtime Error

Solution code:
#include<time.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
using namespace std;
struct Fast { Fast(){ std::cin.tie(0); ios::sync_with_stdio(false); } } fast;

template<typename ...Ts>
void show(Ts... ts){
  cout<<"#:";
  auto print=[](auto v){cout<<v<<" ";};
  initializer_list<int>{(void(print(ts)),0)...};
  cout<<endl;
}

int main(void){
    int n,k;
    cin>>n>>k;
    string s;
    cin>>s;
    s[k-1]-='A'-'a';
    string ans=s;
    cout<<ans;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())

node_edges = {i: {} for i in range(1, N + 1)}
node_colors = {i: None for i in range(1, N + 1)}

for i in range(1, N):
    u, v, w = map(int, input().split())
    node_edges[u][v] = w % 2
    # node_edges[v][u] = w % 2

# print(node_edges)
# print(node_colors)

def dfs(i):
    if node_colors[i] is None:
        node_colors[i] = 0

    for u, w in node_edges[i].items():
        # print(f"i={i}, u={u}, w={w}")
        if node_colors[u] is None:
            if w == 0:
                node_colors[u] = node_colors[i]
            else:
                node_colors[u] = abs(node_colors[i] - 1)
        
    # print(node_colors)

node_colors[1] = 0
for i in range(1, N + 1):
    dfs(i)
    print(node_colors[i])

Submission status: Runtime Error

Solution code:
  1 N, K = input().split()
  2 S = input()
  3 K = int(K)
  4 li = list(S)
  5 li[K-1] = chr(ord(S[K-1])+32)
  6 print(''.join(li))

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

Submission status: Runtime Error

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, K = MAP()
S = 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)

Submission status: Runtime Error

Solution code:
d={'A':'a','B':'b','C':'c'}
N,K=map(input().split())
S=input()
print(S[:K-1]+d[S[K-1]]+S[K:])

Submission status: Runtime Error

Solution code:
N,K = map(int, input().split())
S = input()
print(*[s if i != K else s.lower() for i in range(N)])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = [int(k) for k in list(input())]
s1 = 10*int(s[0])+int(s[1])
s2 = 10*int(s[2])+int(s[3])
if s2 == 0 and s1 > 12:
    print("NA")
elif s1 > 12 and s2 <= 12:
    print("YYMM")
elif s1 <= 12 and s2 > 12:
    print("MMYY")
else:
    print("AMBIGUOUS")

Submission status: Runtime Error

Solution code:
s = [int(k) for k in list(input())]
s1 = 10*int(s[0])+int(s[1])
s2 = 10*int(s[2])+int(s[3])
if s2 == 0:
    print("NA")
elif s1 <= 12 and s2 <= 12:
    print("AMBIGUOUS")
elif s1 <= 12 and s2 >= 12:
    print("MMYY") 
else:
    print("YYMM")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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:

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

if __name__ =='__main__':
  CC()

Submission status: Runtime Error

Solution code:

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

Als=['A', 'B', 'C']
als=['a', 'b', 'c']

if(K>N):
  print('error: K is too big')
else:
    for target in Als:
  		if(S[K] == target):
    	S[K]=als[Als.index(target)]
		break
    print(S)

Submission status: Runtime Error

Solution code:
from collections import deque,defaultdict
n=int(input())
routes=[tuple(map(int,input().split())) for i in range(n-1)]

edges=defaultdict(list)
for v1,v2,dist in routes:
  edges[v1-1].append([v2-1,dist])

ans=[0]*n
q=deque([0])
while q:
  v=q.popleft()
  if ans[v]==0:
    color=[0,1]
  else:
    color=[1,0]
  for edge in edges[v]:
    v2=edge[0]
    dist=edge[1]
    q.append(v2)
    if dist%2==1:
      ans[v2]=color[1]
    else:
      ans[v2]=color[0]
print(*ans,sep='\n')

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 = int(input())
K = int(input())
S = input()
s1 = S[:K - 1]
s2 = S[K:]

if S[K - 1] == 'A':
    s = s1 + 'a' + s2

elif S[K - 1] == 'B':
    s = s1 + 'b' + s2

else:
    s = s1 + 'c' + s2

print(s)

Submission status: Runtime Error

Solution code:
N = int(input())
K = int(input())
S = input()
s1 = S[:K - 1]
s2 = S[K + 1:]

if S[K - 1] == 'A':
    s = s1 + 'a' + s2

elif S[K - 1] == 'B':
    s = s1 + 'b' + s2

else:
    s = s1 + 'c' + s2

print(s)

Submission status: Runtime Error

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

if S[K - 1] == 'A':
  s = S.replace('A', 'a')

elif S[K - 1] == 'B':
  s = S.replace('B', 'b')

else:
  s = S.replace('C', 'c')

print(s)

Submission status: Runtime Error

Solution code:
import fileinput

if __name__ == '__main__':
  for line in fileinput.input():
    tokens = list(map(int, line.strip().split()))
    N, K, S = tokens[0], tokens[1], tokens[2]


if S[K - 1] == 'A':
  s = S.replace('A', 'a')

elif S[K - 1] == 'B':
  s = S.replace('B', 'b')

else:
  s = S.replace('C', 'c')

print(s)

Submission status: Runtime Error

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

if S[K - 1] == 'A':
  s = S.replace('A', 'a')

elif S[K - 1] == 'B':
  s = S.replace('B', 'b')

else:
  s = S.replace('C', 'c')

print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K = list(map(int, input().split()))
S = str(input())
m = chr(ord(S[K-1]) - 32)
print(N[:m] + m + N[m+1:])

Submission status: Runtime Error

Solution code:
N, K = list(map(int, input().split()))
S = str(input())
m = chr(ord(S[K]) - 32)
print(N[:m] + m + N[m+1:])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

sys.setrecursionlimit(5000)

N = int(input())

tree = [[] for i in range(N)]

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


color = - np.ones(N)
color[0] = 0

def dfs(V):
    for p, w in tree[V]:
        if color[p] == -1:
            color[p] = color[V] if w % 2 == 0 else 1 - color[V] 
            dfs(p)

dfs(0)

for c in color:
    print(int(c))

Submission status: Runtime Error

Solution code:
firstvalid = isMonth(date[0:2])
secondvalid = isMonth(date[2:])
 
if firstvalid and secondvalid:
  print('AMBIGUOUS')
elif firstvalid:
  print('MMYY')
elif secondvalid:
  print('YYMM')
else:
  print('NA')
  
  
def isMonth(x):
  y = int(x)
  return 1 <= y and y <= 12

Submission status: Runtime Error

Solution code:
firstvalid = isMonth(date[0:2])
secondvalid = isMonth(date[2:])
 
if firstvalid && secondvalid:
  print('AMBIGUOUS')
elif firstvalid:
  print('MMYY')
elif secondvalid:
  print('YYMM')
else:
  print('NA')
  
  
def isMonth(x):
  y = int(x)
  return 1 <= y && y <= 12

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
s = input()
print(s[:K] + s[K:].capitalize.swapcase)

Submission status: Runtime Error

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

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

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

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

print(str1+str2+str3)

Submission status: Runtime Error

Solution code:
a,k=list(map(int, input().split()))
j=list(map(str, input().split()))
j[k-1].lower()
res=""
for i in j:
  res+=i
print(res)

Submission status: Runtime Error

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

st = s[k].upper()
print(s[:k] + st + s[k+1:])

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

print(r)

Submission status: Runtime Error

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

s = input()

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

if s[k - 1] =='A':
  s3.append('a')
  print(s3 + s2)
elif s[k - 1] == 'B':
  s3.append('b')
  print(s3 + s2)
elif s[k - 1] == 'C':
  print(s3 + s2)

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)if s[k-1] == 'A':
  s[k-1] = 'a'

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x = input()

a, b = x.split()
a = list(a)
b = int(b)

a[b] = a[b].lower()

print("".join(a))

Submission status: Runtime Error

Solution code:
#NとKに数値入る                                                                                                                   N,K = map(int, input().split())

#before_strに文字列
before_str = input()

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

after_str = ''.join(str_list)

print(after_str)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=list(input())
k=int(input())
s[k-1]=s[k-1].lower()
print(*s,sep="")

Submission status: Runtime Error

Solution code:
s=input()
k=int(input())
x=s[k-1]
y=x.lower()
print(s.replace(x,y))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
s=list(input())
s[k]=chr(ord(s[k])+32)

print(*s,sep='')

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
elif S[K-1]==C
  S[K-1]=c
print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from collections import defaultdict
from operator import itemgetter


def solve():
    N, M = map(int, input().split())
    xy_dict = defaultdict(int)
    xy = [[] for _ in range(N)]
    for _ in range(M):
        x, y, z = map(lambda j: int(j)-1, input().split())
        xy_dict[x] += 1
        xy_dict[y] += 1
        xy[x].append(y)
        xy[y].append(x)
    
    xy_sorted = sorted(xy_dict.items(), key=itemgetter(1), reverse=True)
    opened = [0 for _ in range(N)]
    ans = N
    length = len(xy_sorted)
    for i in range(length):
        parent = xy_sorted[i][0]
        if opened[parent] == 1:
            for child in xy[parent]:
                if opened[child] == 0:
                    opened[child] = 1
                    ans -= 1
            continue
        opened[parent] = 1
        for child in xy[parent]:
            opened[child] = 1
        ans -= xy_dict[parent]
    print(ans)


if __name__ == '__main__':
    solve()

Submission status: Runtime Error

Solution code:
K = map( int, input().split() )
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 = str( input() )
S[ K - 1 ] = S[ K - 1 ].lower()
print( S )

Submission status: Runtime Error

Solution code:
N, K = 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()
print(s[k].lower())

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if s[k-1] == 'A':
    print(s[:k-1]　+ 'a' + s[k:])

elif s[k-1] == 'B':
    print(s[:k-1] + 'b' + s[k:])

else:
    print(s[:k-1] + 'c' + s[k:])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if s[k-1] == 'A':
    print(s[:k-1]　+ 'a' + s[k:])

elif s[k-1] == 'B':
    print(s[:k-1] + 'b' + s[k:])

else:
    print(s[:k-1] + 'c' + s[k:])

Submission status: 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'

elif s[k-1] == 'C':
    s[k-1] = 'c'
    
print(s)

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'

elif s[k-1] == 'C':
    s[k-1] = 'c'

Submission status: Runtime Error

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

x = str(s[k-1])
y = x.lower()
s[k-1] = y

print(s)

Submission status: Runtime Error

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

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

print(s)

Submission status: Runtime Error

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

x = s[k-1]
y = x.capitalize()
s[k-1] = y

print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
y = [0,1,2,3,4,5,6,7,8,9]
one = [1]
zero = [0]
p = [1,2,3,4,5,6,7,8,9]
q = [0,1,2]
a=N//1000
b=(N - (a * 1000))//100 
c=(N- (a*1000)-(b * 100))// 10
d=(N - (a*1000)-(b*100)-(c*10))

if ((a in one) and (b in q)or(a in zero) and (b in p))and((c in one) and (d in q)or(c in zero)and(d in p)):
  print('AMBIGUOUS')
elif (a in y )and(b in y)and((c in one) and (d in q) or (c in zero) and(d in p)):
  print('YYMM')
elif ((a in one )and(b in q))or((a in zero)and(b in p))and(c in y) and (d in y):
  print('MMYY')
else:
  print('NA')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

s = S(K)
s_large = s.upper()

S = [s_large if s=S(K) else 0 for s in S]

Submission status: Runtime Error

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

s = list(input())

if n == 1:
    print(s.lower())
    break
else:
    l = []
    for x in s:
        if x == s[k - 1]:
            l.append(x.lower())
        else:
            l.append(x)
    a = ''.join(l)
    print(a)

Submission status: Runtime Error

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

print(s.replace(s[k], s[k].lower()))

Submission status: Runtime Error

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

Submission status: Runtime Error

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


#n番目の文字を指定されたら n-1番目が真の指定

number = (K-1)

if S[number] == "A":
    S[number] = "a"
elif S[number] == "B":
    S[number] = "b"
elif S[number] == "C":
    S[number] = "c"     

print("".join(s))

Submission status: Runtime Error

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


#n番目の文字を指定されたら n-1番目が真の指定

number = (K-1)

if S[number] == "A":
    S[number] = "a"
elif S[number] == "B":
    S[number] = "b"
elif S[number] == "C":
    S[number] = "c"     

print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k=map(int, input().split())
s=str(input())
S=list(s)
if S[k]=='A':
  S[k]='a'
elif S[k]=='B':
  S[k]='b'
else:
  S[k]='c'
print(','.join(S))

Submission status: Runtime Error

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

n = int(input())
uvw = [list(map(int, input().split())) for _ in range(n-1)]

graph = [[] for _ in range(n)]
for i in range(n-1):
    graph[uvw[i][0]-1].append((uvw[i][1]-1, uvw[i][2]))
    graph[uvw[i][1]-1].append((uvw[i][0]-1, uvw[i][2]))

stack = [0]
visited = []
ans = [0]*n
while stack:
    node = stack.pop()
    visited.append(node)
    for child in graph[node]:
        if child[0] not in visited:
            stack.append(child[0])
            if child[1]%2 == 0:
                ans[child[0]] = ans[node]
            else:
                ans[child[0]] = (ans[node]+1)%2

[print(ans[i]) for i in range(n)]

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,a=map(int,input().split())
l=list(input())
if l[a]=='A':
  l[a]='a'
if l[a]=='B':
  l[a]='b'
if l[a]=='C':
  l[a]='c'
k=''.join(l)
print(k)

Submission status: Runtime Error

Solution code:
n=int(input())
dis=[10**15]*n
dis[0]=0
pair=[[]for _ in range(n)]
for i in range(n-1):
	a,b,c=map(int,input().split())
	pair[a-1].append([b-1,c])
	pair[b-1].append([a-1,c])
now=0
stack=set()
cnt=n-1
while cnt!=0:
	for i in range(len(pair[now])):
		if dis[pair[now][i][0]]==10**15:
			dis[pair[now][i][0]]=dis[now]+pair[now][i][1]
			stack.add(pair[now][i][0])
	now=list(stack)[0]
	stack=set(stack)
	stack.remove(now)
	cnt-=1
for i in range(n):
	if dis[i]%2==0:
		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"

print("".join(S))

Submission status: Runtime Error

Solution code:
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:
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("".join(S))