The owner of each attacking creature chooses whether to put it on the top or bottom of their library. The active player (the player whose turn it is) makes all of their choices first, followed by each other player in turn order.