sortied=>sorted
Why do you need a topological sort?
Add the fact that "topological" here means the inheritance hierarchy.