Constraint Satisfaction Problem solved by brute force and with heuristics