Otherwise
else : NEW_LINE INDENT ans = max ( ans , 1 + solve ( s , n , idx + 1 , k , s [ idx ] , 1 ) ) NEW_LINE DEDENT dp [ idx ] [ k ] [ ord ( last ) - ord ( ' a ' ) ] [ count ] = ans NEW_LINE print ( ans ) NEW_LINE return dp [ idx ] [ k ] [ ord ( last ) - ord ( ' a ' ) ] [ count ] NEW_LINE