package main import ( "fmt" "strconv" ) func main() { var n int fmt.Scan(&n) c := make([]int, 10) for i := range make([]struct{}, 9) { fmt.Scan(&c[i+1]) } ans := "" for i := len(c) - 1; i >= 0; i-- { for range make([]struct{}, c[i]) { ans += strconv.Itoa(i) } } fmt.Println(ans) }