N = int(input()) cn = list(map(int,input().split())) result = [] for i in range(1,10): result += [str(i)]*cn[i-1] print(''.join(result[::-1]))