Backtracking Algorithm Python Example Code Easy Titanic Pet