// ε…₯εŠ› // 3 // 1 2 0 0 0 0 0 0 0 // ε‡ΊεŠ› // 221 let n = Int(readLine()!)! let counts = readLine()!.split(separator: " ").map { Int($0)! } var str = "" for num in 1...9 { let count = counts[num-1] let subStr = String(repeating: String(num), count: count) str = subStr + str } print(str)