The difference between a stack-based depth-first traversal and a
recursion-based traversal is the order in which nodes get visited.
Since autotest is a stack-based solution, you should also use a
stack to get the same output.
Sorry for the confusion.
--Stephen