Prolog programs for SE 3306