public static List<String> toLabelPath(Node node){
  final LinkedList<String> paths=new LinkedList<String>();
  Node current=node;
  Node parent=firstParent(node);
  while (parent != null) {
    paths.addFirst(current.getLabel());
    current=parent;
    parent=firstParent(current);
  }
  return paths;
}

public static List < String > toLabelPath ( Node node ) { final LinkedList < String > paths = new LinkedList < String > ( ) ; Node current = node ; Node parent = firstParent ( node ) ; while ( parent != null ) { paths . addFirst ( current . getLabel ( ) ) ; current = parent ; parent = firstParent ( current ) ; } return paths ; }
return path queue , with root being on top .
