def main(): N = int(input()) C = list(map(int, input().split())) nums = [] for i, c in enumerate(C): if c > 0: for _ in range(c): nums.append(i + 1) n = sorted(nums, reverse=True) print(''.join(map(str, n))) if __name__ == '__main__': main()