Ties in ranking resolved randomly.