The stochastic effect in contact single patterning is one of the primary challenges in extending into sub-40nm pitch with 0.33NA EUV. EUV stochastic defects induced by EUV photon shot noise are known to strongly correlate to image contrast. Mitigation of Mask3D induced contrast fading is one of the key solutions to enable further shrink, while maintaining sufficient defect-free process latitude. Wavefront and pupil co-optimization is designed to compensate the Mask 3D phase error that leads to contrast fading. For application in HVM, the newly developed Pupil/Mask/Wavefront co-optimization gives the best imaging performance while maintaining the illumination efficiency and decreasing the rms wavefront for the final optimal wavefront to ensure there is no negative impact on the rest of the patterns that are not included in the optimization.In this paper, we investigate how to apply Pupil/Mask/Wavefront co-optimization to improve the image contrast of a sub-40nm pitch contact hole array, including in-resist verification. We will first explain the fundamentals of Mask 3D fading mitigation via phase injection for a 1D feature and how to extend this concept to 2D features. We will compare the effectiveness of new Pupil/Mask/Wavefront co-optimization versus Zernike Z5 or Z6 only phase injection method. Finally, we will show the potential benefit in combination with using a low-n phase shifting mask for which the optimum image contrast is achieved with the co-optimized wavefront, pupil and mask.