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