added importerror in try catch.
if constraintsolving fails, bruteforce enumeration is used