n=input() l=input().split() a=[] b='' for i in range(9): a+=[f'{i+1}'*int(l[i])] a.sort(reverse=1>0) for i in a: b+=i print(b)