Simple constraint satisfaction problem solver, written in Python