Fix the implementation in `/app/solution.mjs`. Return a valid topological ordering for a dependency map, throwing on cycles. Preserve the exported `solve` API and run the available tests.
