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

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

for i in range(n):
  if i != k:
    print(s[i], end="")
  else:
    if s[k] == "A":
      print("a", end="")
    elif s[k] == "B":
      print("b", end="")
    elif s[k] == "C":
      print("c", end="")