mahmoud's ranking advice gives us an ordered graph