In python, how could I create a quantitative ranking scale from qualitative information?

Say I have a large list, and I have information on every item in the list. For instance I know A is preferential to B, B is preferential to C, but C is preferential to A and so on. The magnitude of how preferential something is in comparison to another is not known. How could I implement something to rank all of the items in the list from 1-100 or a similar scale based on this information?