Polarization of excited nuclear levels induced by atomic orientation