Python warnsdorff knight's tour solution