added the code to print the tree in a spiral