from functools import total_ordering