c = Counter(x for x, y in ranks)
sorted(set(it.chain(*ranks)), key=c.__getitem__, reverse=True)
Given a linear order completely represented by a list of tuples of strings, output the order as a list of strings