Determining the order of people rowing across the river