There isn't a good method to get the names of nodes with multiple names since there isn't anything in the output files that indicates which names go to which node. It would be easier if the output files had a delimiter (such as |) between each node and weight.