s = "" n,*c = map(int,open(0).read().split()) for i in range(9)[::-1]: s += str(i+1)*c[i] print(s)