+dictionary_neighbours = {
+ w: [o for o in dictionary
+ if edit_distance(w, o) <= 5
+ if not set(w) <= set(o)
+ if not set(o) <= set(w)]
+ for w in dictionary}
+
+dictionary_neighbours = {w: ns
+ for w, ns in dictionary_neighbours.items()
+ if ns}
+```
+
+```python
+def collapse_riddle_clues(elems : Riddle) -> RiddleElems:
+ """Combine the two parts of a riddle line into one element for solving.
+ This takes account of the valence of the two parts."""