Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. class Node
  2. {
  3.     public String name;
  4.     public List<Node> children;
  5. }
  6.  
  7. void printNodeTree(Node root)
  8. {
  9.     print root.name;
  10.     for each (Node currentNode in root.children)
  11.         printNodeTree(currentNode);
  12. }