N=int(input()) cl=list(map(int,input().split())) for i in range(9): print(str(9-i)*cl[9-i-1],end='') print()