Exact solutions of the vertical gravitational anomaly for a polyhedral prism with vertical polynomial density contrast of arbitrary orders