By casting lots, the leader of each family chose one gate for their group to guard. All of them, including young men and old men (OR, including leaders of large families and small families), cast lots.