Allow group to communicate with another group without communicating with each other

If we have two groups, lets say INTERNS and MANAGERS can we make it so that INTERNS can communicate with MANAGERS and vice versa but INTERNS cannot communicate with other INTERNS?

Thank you in advance.

You can try Packet Filter plugin for Openfire and create rules disabling messages (and probably other types of packets) from a group to the same group.