Working solver (tested with a single move)