function sol = CS_find_sol(KB)
%

sol = [];
m = length(KB);
n = max(CS_vars(KB,[]));

for v = 0:2^n-1
    bits = CS_int2bits(v,n);
    OK = zeros(m,1);
    k = 1;
    while k<=m
        OK(k) = CS_sat(KB(k).clauses,bits);
        k = k + 1;
    end
    if min(OK)==1
        sol = bits;
        return
    end
end

tch = 0;
