import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
N,k = map(int,input().split())
S = list(input())[:-1]
s = S[k-1]
if s == "A":
    S[k-1] = "a"
if s == "B":
    S[k-1] = "b"
if s == "C":
    S[k-1] = "c"
print("".join(S)) import sys sys input=sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 from itertools import accumulate from itertools import permutations from itertools import combinations from collections import defaultdict from collections import Counter import fractions fractions import math math from collections import deque from bisect import bisect_left from bisect import insort_left import itertools itertools from heapq import heapify from heapq import heappop from heapq import heappush import heapq heapq import numpy as np numpy INF = float("inf") INF float("inf") float "inf" N,k = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split k S = list(input())[:-1] S list(input())[:-1] (input()) list input() input :-1 -1 s = S[k-1] s S[k-1] S k-1 k 1 if s == "A":
    S[k-1] = "a" s == "A" s "A" S[k-1] = "a" S[k-1] S k-1 k 1 "a" if s == "B":
    S[k-1] = "b" s == "B" s "B" S[k-1] = "b" S[k-1] S k-1 k 1 "b" if s == "C":
    S[k-1] = "c" s == "C" s "C" S[k-1] = "c" S[k-1] S k-1 k 1 "c" print("".join(S)) print "".join(S) "".join "" join S k = map(int,input().split()) map(int,input().split()) k input=sys.stdin.readline sys.stdin.readline input S = list(input())[:-1] list(input())[:-1] S N,k = map(int,input().split()) map(int,input().split()) N s = S[k-1] S[k-1] s INF = float("inf") float("inf") INF
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
N,k = map(int,input().split())
S = list(input())[:-1]
s = S[k-1]
if s == "A":
    S[k-1] = "a"
if s == "B":
    S[k-1] = "b"
if s == "C":
    S[k-1] = "c"
print("".join(S))