object Main extends App {
  val n = io.StdIn.readLine().toInt
  val line = io.StdIn.readLine()
  val k = io.StdIn.readLine().toInt
  val ks = line(k - 1)
  println(line.foldLeft("")((acc, a) => if (a == ks) acc ++ a.toString else acc ++ "*"))
}