If there is no such character , all are sorted in decreasing order , means we just printed the last permutation and we are done .
if ( i == - 1 ) : NEW_LINE INDENT isFinished = True NEW_LINE DEDENT else : NEW_LINE