fun main() { readln() val s = readln() val p = readln().split(" ").map { it.toInt() } for (i in p) { print(s[i - 1]) } println() }