N = int(input()) line = input().split(" ") number_list = list() for c in line: number_list.append(int(c)) index = 9 return_list = list() for x in reversed(number_list): for i in range(x): return_list.append(str(index)) index -= 1 print("".join(return_list))