Japanese macaques live in matrilineal societies, and females stay in their natal groups for life, while males move out before they are sexually mature. Macaque groups tend to contain a number of adults of both sexes. In addition, a Japanese macaque troop contains several matrilines. These matrilines may exist in a dominance hierarchy with all members of a specific group ranking over members of a lower-ranking group. Temporary all-male groups also exist, composed of those that have recently left their natal groups and are about to transfer to another group. However, many males spend ample time away from any group and may leave and join several groups.