n,*a=map(int,open(0).read().split()) s='' for i in range(9): s+=str(i+1)*a[i] print(s[::-1])