spiral traversal of tree