MST with priorityqueue and godlike comparable implementation