import java.lang.StringBuilder fun main(args: Array) { val n = readLine()!!.toInt() val c = readLine()!!.split(" ").map { it.toInt() } var ans = "" c.indices.reversed().forEach { idx -> c[idx].let { cnt -> if(cnt > 0) { (idx+1).toString()[0].let { num -> ans += "".padStart(cnt, num) } } } } println(ans) }