Sort nodes by level, then name