#yuki1628 n=int(input()) c=list(map(int,input().split())) s='' for i in range(9): s+=str(i+1)*c[i] print(s[::-1])