When a society has too many men and not enough women, the consequences can last for generations