import sys

input = sys.stdin.readline


def main():
  N, M = map(int, input().strip().split())
  S = input().strip()
  
  print(S[:M-1] + S[M-1].lower() + S[M:])


if __name__ == '__main__':
  main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def main():
  N, M = map(int, input().strip().split())
  S = input().strip()
  
  print(S[:M-1] + S[M-1].lower() + S[M:]) main N, M = map(int, input().strip().split()) N map(int, input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split M S = input().strip() S input().strip() ().strip () input strip print(S[:M-1] + S[M-1].lower() + S[M:]) print S[:M-1] + S[M-1].lower() + S[M:] S[:M-1] + S[M-1].lower() S[:M-1] S :M-1 M-1 M 1 S[M-1].lower() [M-1].lower [M-1] S M-1 M 1 lower S[M:] S M: M if __name__ == '__main__':
  main() __name__ == '__main__' __name__ '__main__' main() main def main():
  N, M = map(int, input().strip().split())
  S = input().strip()
  
  print(S[:M-1] + S[M-1].lower() + S[M:]) def main():
  N, M = map(int, input().strip().split())
  S = input().strip()
  
  print(S[:M-1] + S[M-1].lower() + S[M:]) main input = sys.stdin.readline sys.stdin.readline input
import sys

input = sys.stdin.readline


def main():
  N, M = map(int, input().strip().split())
  S = input().strip()
  
  print(S[:M-1] + S[M-1].lower() + S[M:])


if __name__ == '__main__':
  main()
