n=int(input()) l=list(map(int,input().split())) for i,m in enumerate(reversed(l)): for j in range(m): print(9-i,end='') n-=1 if n == 0: break