I remember being an Airman Recruit at NATTC Pensacola, and encountering a group of CPOs and Marine SNCOs. I greeted the group with a hearty "Good afternoon gentlemen," and was promptly informed that no part of any of those mens' uniforms indicated "Gentleman." I guess this was a 'damned if you do, damned if you don't' situation.
I've since learned to try to identify and address the highest ranking member first, and catch the rest of the bunch as I'm passing by. Certainly not a fool proof system, but it serves well enough.
Cheers,
-Paul/AT1