def Main(): n=int(input()) a=list(map(int,input().split())) a=a[::-1] for i in range(9): k=9-i for _ in range(a[i]): print(k,end="") print() Main()