When I graduated from high school, the official choreography of the event required everyone in my class to line up in height-order lines by gender. After that the two lines were placed side by side, so that we would process in and out of commencement next to a person of the opposite gender who was the exact same rank, height-wise, as we were.