Iterate from bset . _Find_first ( ) to bset . size ( ) - 1
for i in range ( len ( bset ) ) : NEW_LINE INDENT if ( bset [ i ] + 1 > n ) : NEW_LINE INDENT break NEW_LINE DEDENT print ( bset [ i ] + 1 ) NEW_LINE DEDENT