Cppreference Next Permutation Interviewbit Python