n = int(input()) s = list(map(int, input().split())) num = [int(x) for x in range(1, 10)] ans = [] for i in range(9): for j in range(s[i]): if s[i] > 0: ans.append(num[i]) for a in sorted(ans, reverse=True): print(a, end="")