Problem:


Score : 100 points

Problem Statement

You are given a string S of length N consisting of A, B and C, and an integer K which is between 1 and N (inclusive).
Print the string S after lowercasing the K-th character in it.

Constraints

1 ≤ N ≤ 50

1 ≤ K ≤ N

S is a string of length N consisting of A, B and C.

Input

Input is given from Standard Input in the following format:

N K
S

Output

Print the string S after lowercasing the K-th character in it.

Sample Input 1

3 1
ABC

Sample Output 1

aBC

Sample Input 2

4 3
CABA

Sample Output 2

CAbA



Sample input:
3 1
ABC


Sample output:
aBC

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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

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

input = lambda: stdin.readline().rstrip()
main()

Submission status: Accepted

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

ans = ""
for idx,c in enumerate(S):
    if idx+1 == K:
        ans = ans + c.lower()
    else:
        ans = ans + c
print(ans)

Submission status: Accepted

Solution code:
sp = input().split()
li = list(map(int,sp))
n,m = li
a = list(input())
a[m-1] = a[m-1].lower()
print("".join(a))

Submission status: Accepted

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

s[k-1] = chr(ord(s[k-1]) - ord('A') + ord('a'))
print("".join(s))

Submission status: Accepted

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

c = ord(S[K-1])
S = list(S)
S[K-1] = chr(c-ord('A')+ord('a'))
S = ''.join(S)
print(S)

Submission status: Accepted

Solution code:

def read_input():
    n, k = map(int, input().split())
    s = input()
    slist = list(s)
    return n, k, slist


def submit():
    n, k, slist = read_input()
    slist[k-1] = slist[k-1].lower()
    print(''.join(slist))
    return


if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:


from math import *



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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def gcd_core(a, b):
    if b == 0:
        return a
    else:
        return gcd_core(b, a % b)


def gcd(arr):
    g = gcd_core(arr[0], arr[1])
    for i in range(2, len(arr)):
        g = gcd_core(g, arr[i])
    return g

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

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

out = ""

for i in range(n):
    out += str(s[i])
print(out)

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
S = input()
dic = {"A":"a","B":"b","C":"c"}
S = S[:k-1] + dic[S[k-1]]+S[k:]
print(S)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


def solve(N: int, K: int, S: str):
    S_list = list(S)
    S_list[K-1] = S_list[K-1].lower()
    S = ''.join(S_list)
    print(S)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(N, K, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

S=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
al = 'abcdefghijklmnopqrstuvwxyz'
AL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
a, b = map(int,input().split())
s = input()
ans = ''
for i in range(a):
    if i == b-1:
        ans += al[AL.index(s[i])]
    else:
        ans += s[i]
print(ans)

Submission status: Accepted

Solution code:
def changing_a_character(N: int, K: int, S: str)->str:
    return ''.join(c.lower() if i == K-1 else c for i, c in enumerate(S))


if __name__ == "__main__":
    N, K = map(int, input().split())
    S = input()

    ans = changing_a_character(N, K, S)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
s=list(map(ord, input()))
s[b-1]+=ord("a")-ord("A")
print("".join(map(str, map(chr, s))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)

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

Submission status: Accepted

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

S[K-1] = S[K-1].lower()
print("".join(map(str,S)))

Submission status: Accepted

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

if s[k-1] == 'A':
    s[k-1] = 'a'
elif s[k-1] == 'B':
    s[k-1] = 'b'
else:
    s[k-1] = 'c'
res = ''
for e in s:
    res += e
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# /usr/bin/python
# -*- coding: utf-8 -*-
import math
import string


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

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

Submission status: Accepted

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


def main():
  _, n = map(int, input().split())
  s = input().strip()
  s = s[:n - 1] + s[n - 1:n].lower() + s[n:]

  print(s)


if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
small = {'A': 'a', 'B': 'b', 'C': 'c'}
n, k = map(int, input().split())
s = list(input())

s[k-1] = small[s[k-1]]
print(''.join(s))

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math

import array
import bisect
import collections
from collections import Counter, defaultdict
import fractions
import heapq
import re

sys.setrecursionlimit(1000000)


def array2d(dim1, dim2, init=None):
    return [[init for _ in range(dim2)] for _ in range(dim1)]

def argsort(l, reverse=False):
    return sorted(range(len(l)), key=lambda i: l[i], reverse=reverse)

def argmin(l):
    return l.index(min(l))

def YESNO(ans, yes="YES", no="NO"):
    print([no, yes][ans])

II = lambda: int(input())
MI = lambda: map(int, input().split())
MIL = lambda: list(MI())
MIS = lambda: input().split()


def main():
    n, k = MI()
    s = ""
    for n, c in enumerate(input()):
        s += c.lower() if n == k-1 else c
    return s


if __name__ == "__main__":
    print(main())

Submission status: Accepted

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

N, K = map(int, input().split())
S = input()
l = list(S)
l[K-1] = l[K-1].lower()
R = "".join(l)

print(R)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n,k = map(int, input().split())
s = list(input())

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

Submission status: Accepted

Solution code:
n,m = map(int,input().split())
m -= 1
s = str(input())
S = []
for i in range(n):
    if i == m:
        S.append(s[i].lower())
    else:
        S.append(s[i])
print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    n,k = LI()
    s = input()
    for i in range(k-1):
        print(s[i],end = "")
    print(s[k-1].lower(),end = "")
    for i in range(k,n):
        print(s[i],end = "")
    print()
    return

#B
def B():
    n = I()

    return

#C
def C():
    n = I()

    return

#D
def D():
    n = I()

    return

#E
def E():
    n = I()

    return

#F
def F():
    n = I()

    return

#Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M = map(int, input().split())
S = input()
s = S.lower()

print(S[:M - 1] + s[M - 1] + S[M:])

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    N, K = map(int, input().split())
    S = str(input().strip())

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

    return ans


if __name__ == '__main__':
    print(main())

Submission status: Accepted

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


def main():
    n, k = map(int, input().split())
    s = input()
    ans = ''

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#ABC126-A
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
n,k=IL()
s=input()
print(s[:k-1]+s[k-1].lower()+s[k:])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
# input = sys.stdin.readline
inf = 10 ** 18

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

for i, Si in enumerate(list(S)):
    if i + 1 == K:
        S[i] = Si.lower()

print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print("".join(listS))

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
s=input()
a=""
for i in range(n):
  if i==k-1:a+={"A":"a","B":"b","C":"c"}[s[i]]
  else:a+=s[i]
print(a)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(*S, sep='')

Submission status: Accepted

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


def solve(N: int, K: int, S: str):
    ret = ''
    for i, c in enumerate(S):
        if i + 1 == K:
            ret += c.lower()
        else:
            ret += c
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(N, K, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

S = list(S)

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

print("".join(S))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
from collections.abc import Iterable
from math import *
from itertools import *
from collections import *
from functools import *
from operator import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(N: int, K: int, S: str):
    s = list(S)
    s[K-1] = {"A": "a", "B": "b", "C": "c"}[s[K-1]]
    return ''.join(s)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    result = solve(N, K, S)
    if isinstance(result, Iterable) and not isinstance(result, str):
        result = '\n'.join([str(v) for v in result])
    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

# n = int(input())
# 
# 

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

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

Submission status: Accepted

Solution code:
N, K = list(map(int, input().split()))
for idx,c in enumerate(input()):
  if idx == K -1:
    print(c.lower(), end='')
  else:
    print(c, end='')
print()

Submission status: Accepted

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

if S[K-1] == 'A':
    S[K-1] = 'a'
    
if S[K-1] == 'B':
    S[K-1] = 'b'
    
if S[K-1] == 'C':
    S[K-1] = 'c'
    
res = ''
for i in range(N):
    res += S[i]

print(res)

Submission status: Accepted

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

print(''.join(s))

Submission status: Accepted

Solution code:
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

sys.setrecursionlimit(10000)
INF = float('inf')

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

S = list(input())

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

S = list(input())

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

print(''.join(S))

Submission status: Accepted

Solution code:


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N, K = map(int, input().split())
S = input()[:-1]
ans = ""
for i, c in enumerate(S):
    if i == K-1:
        ans += c.lower()
    else:
        ans += c
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# from sys import exit
N,K = [int(n) for n in input().split()]
# N = int(input())
# a = [int(input()) for _ in range(N)]
S = list(str(input()))
L = len(S)
# T = str(input())
# exit()
S[K-1] = S[K-1].lower()
print("".join(S))

Submission status: Accepted

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

ans = ""

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

Submission status: Accepted

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

Submission status: Runtime Error

Solution code:
s = list(input())
s = [int(i+j) for (i,j) in zip(s[::2],s[1::2])]

zero = int('{0:02d}'.format(0))

if zero <= s[0] <= 12:
  if zero <= s[1] <= 12:
    print("AMIGUOUS")
  else:
    print("MMYY")
else:
  if zero <= s[1] <= 12:
    print("YYMM")
  else:
    print("NA")

Submission status: Runtime Error

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

print(join(s[k-1].swapcase()))

Submission status: Runtime Error

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

print(s[k-1].swapcase)

Submission status: Runtime Error

Solution code:
#ABC126 B

S = list(map(int,input()))
if 1 <= S[0]*10 + S[1] <= 12 and 1 <= S[2]*10 + S[3] <= 12:
    print("AMBIGUOUS")
elif 1 <= S[0]*10 + S[1] <= 12 and (S[2]*10 + S[3] > 12 or S[2]*10 + S[3] == 0):
    print("MMYY")
elif (S[0]*10 + S[1] > 12 or S[0]*10 + S[1] == 0)  and  1 <= S[2]*10 + S[3] <= 12:
    print("YYMM")
elif (S[0]*10 + S[1] > 12 or S[0]*10 + S[1] == 0) and (S[2]*10 + S[3] > 12 or S[2]*10 + S[3] == 0):
    print("NA")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n,k = [int(x) for x in input().split()]
s = 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:
S = list(input())
a = S[0] + S[1]
b = S[2] + S[3]
A = int(a)
B = int(b)

if (0 < A < 13 and 0 < B < 13):
  print("AMBIGUOUS")
elif (0 < A < 13 and 12 < B < 100):
  print("MMYY")
elif (0 < A < 13 and B == 0):
  print("MMYY")
elif (0 < B < 13 and 12 < A < 100):
  print("YYMM")
elif (0 < B < 13 and A == 0):
  print("YYMM")
  
else:
  print("NA")

Submission status: Runtime Error

Solution code:
S = list(input())
a = S[0] + S[1]
b = S[2] + S[3]
A = int(a)
B = int(b)

if (0 < A < 13 and 0 < B < 13):
  print("AMBIGUOUS")
elif (0 < A < 13 and (12 < B < 100 or B == 0)):
  print("MMYY")
elif (0 < B < 13 and (12 < A < 100 or A == 0)):
  print("YYMM")
else:
  print("NA")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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:
from collections import deque
N = int(input())
g = [[] for i in range(N)]
for i in range(N-1):
  u,v,w = map(int,input().split())
  u -= 1
  v -= 1
  g[u].append([v,w])
  g[v].append([u,w])
q = deque([])
ans = [-1] * N
q.append(0)
ans[0] = 0
while len(q) > 0:
  e = q.popleft()
  for i in g[e]:
    if ans[i[0]] > -1:
      continue
    ans[i[0]] += i[1]
    ans[i[0]] = ans[i[0]] % 2
    q.append(i[0])
for i in range(len(ans)):
  if ans[i]%2 == 1:
    print(1)
    continue
  print(0)

Submission status: Runtime Error

Solution code:
N,K = map(int,input().split())
S = []
S[K-1] = S[K-1].lower()
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"
else:
  s[k-1]="c"
print(s)

Submission status: Runtime Error

Solution code:
n, k = list(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 = input()
l = s[k - 1]
if l == "A":
    x = s[:(k - 1)] + "a" + s[(k + 1):]
elif l == "B":
    x = s[:(k - 1)] + "b" + s[(k + 1):]
print(x)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(''.join(S))

Submission status: Runtime Error

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

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

print(S)

Submission status: Runtime Error

Solution code:
a,b=map(int, input().split())
s=str(input())
if s[b]=="A":
  s[b]=="a"
if s[b]=="B":
  s[b]=="b"
if s[b]=="C":
  s[b]=="c"
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:])

Submission status: Runtime Error

Solution code:
a,b=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()))
c=list(input())
d=c[b-1].swapcase()
c[b]=d
c=''.join(c)
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(n):
  if i != k:
    print(s[i],end="")
  else:
    x = s[i].lower()
    print(x,end="")

Submission status: Runtime Error

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

for i in range(n):
  if i != k:
    print(s[i],end="")
  else:
    s[i].lower()
    print(s[i],end="")

Submission status: Runtime Error

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

for i in range(n):
  if i != k:
    print(s[i],end="")
  else:
    s[i].upper()
    print(s[i],end="")

Submission status: Runtime Error

Solution code:
small = ['a', 'b', 'c']
capital = ['A', 'B', 'C']

tmp = input().split(" ")
N = int(tmp[0])
K = int(tmp[1])
str = input()

str[K] = small[capital.index(str[K])]

print(str)

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

Submission status: Runtime Error

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

print(S[B].lower())

Submission status: Runtime Error

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

print(S.lower(B))

Submission status: Runtime Error

Solution code:
from collections import deque

graph=[[] for _ in range(N+1)]

N,M=list(map(int,input().split()))

for _ in range(M):
    a,b,c=map(int,input().split())
    graph[a].append(b)
    graph[b].append(a)
    
#seen[i]は、頂点iを訪問済みの場合はTrue、未訪問の場合はFalse
seen=[False]*(N+1)


count=0

for i in range(1,N+1):
    if seen[i]==False:
        seen[i]=True
        S=deque([i])
        
        while S:
            v=S.popleft()
            #訪問済みの頂点をTrueにする
            for i in graph[v]:
                if seen[i]==False:
                    seen[i]=True
                    S.append(i)
        count+=1

print(count)