object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq
  //val ls = in.head.split(' ')
  val S = in(1)
  val K = in(2).toInt
  val c = S(K-1)
  val ret = S.map(e => if(e==c) e else '*')
  println(ret)
}
