Re-implemented using dancing links
It fucked up