Traverse charset from start - 1
for i in range ( start - 1 , - 1 , - 1 ) : NEW_LINE INDENT if ( charset [ i ] > 0 ) : NEW_LINE INDENT charset [ i ] -= 1 NEW_LINE return chr ( i + ord ( ' a ' ) ) NEW_LINE DEDENT DEDENT