n=int(input()) he=1 for i in range(n): num=int(input()) he*=num if he <= 1000000: print(he) else: print(">1000000")