Iterate n-tree without recursion
Iterate n-tree without error
Partial working algorithm for non recursive implementation.