def main(): input() *A, = map(int, input().split()) for i in range(8, -1, -1): print(str(i+1)*A[i], end='') print() if __name__ == '__main__': main()