Jacob put the slave girls with their children first. Then he put Leah and her children behind them. And he put Rachel and Joseph last.