I've found that IntelliJ's optimize imports can order imports lexicographically :)