Artificial Intelligence Homework 4: CSPs Solution