Each player chooses the relative order of the cards they are putting on the bottom of their library, regardless of who controlled them while they were on the battlefield. Players don’t reveal this order to other players.