Backtracking Algorithm Python Example Code Calendar