4/ ChatGPT suggested I use a breadth-first search (BFS) algorithm to traverse the tree, and to use the parent field of each node to access the parent and grandparent of the node. I spent a long time trying to figure out how that worked.