The trick is in two parts:
1. Get a good understanding of how Wayfinder (and almost any other snippet)
uses mini-templates, usually chunks, to format its output, and what options or properties does it provide to add classnames and the like to your HTML output (a reasonable understanding of CSS is also good here).
2. Analyze what it is you want to output. In this case, you have the outer UL container, you have its top row of LI with A elements, some are parents or "category" items that you do not want to be active links, and you have inner UL and A elements.
Then match the correct tpls to the parts of your output.
These may be helpful.