Traverse the binary tree