We want to create the iterative function starting from the corresponding recursive. What the function has to do is go through the non-binary tree, which has numbers as nodes