for x in sorted({i**j for i in range(448)for j in range(2,18)})[2:513]:print x