Add Q2 answer

Please review, thanks!
Also, I tried to fully conform to the style guide, please let me know if there's anything I'm missing.
I see some duplicate. Do you want to create a print_node function and use the function in main and print_nodes?