n = int(input()) cn = map(int,input().split()) an = list(range(1,10)) result = "" for i,ci in enumerate(cn): result+=str(i+1)*ci print(result[::-1])