Groups of prime generalized exponent