import scala.io.{StdIn => in}
import java.lang.{Character => char}

object Main extends App {
  val n = in.readInt
  val s = in.readLine
  val k = in.readInt - 1
  val t = s(k)
  val ans = Array.fill(n)('*')
  for(i <- 0 until n) {
    if(s(i) == t) ans(i) = char.valueOf(t)
  }
  println(ans.mkString)
}