def main(): n = int(input()) c_n = list(map(int, input().split())) ans = [] for idx, c_i in enumerate(c_n): for _ in range(c_i): ans.append(idx + 1) ans.reverse() print("".join(map(str, ans))[:n]) if __name__ == "__main__": main()