fun main() { val a = readLine()!! println(readLine()!!.map { when (it) { in 'a'..'z' -> it else -> a[it - '0'] } }) }