n = int(input()) ls = list(map(int,input().split())) c = "" for i in range(9): c = str(i+1) * ls[i] + c print(c)