Update backtracking.py