fun main(args: Array<String>) {
  val len = Integer.parseInt(readLine() ?: "0")
  val str = readLine() ?: ""
  val pos = Integer.parseInt(readLine() ?: "0")
  var ans = ""
  for(i in 0..len - 1) {
    if(str[i] == str[pos-1]) {
      ans += str[i]
    } else {
      ans += "*"
    }
  }
  println(ans)
}
