python code for the dancing links