fun main(args : Array<String>) {
    val n = readLine()!!.toInt()
    val s = readLine()!!.toMutableList()
    val k = readLine()!!.toInt()

    val target = s[k-1]
    s.forEachIndexed { idx, c ->
        if (c != target) s[idx] = '*'
    }

    println(s.joinToString(""))
}