Sponsored
Use these hints if you're stuck. Try solving on your own first.
Do an iterative depth first search, parsing dashes from the string to inform you how to link the nodes together.
Solve with full IDE support and test cases