Implemented printing in order and post order