parent(john,ann).
parent(john,nick).
parent(helen,nick).
parent(helen,ann).

parent(nick,bill).
parent(nick,mary).
parent(ann,paul).

parent(bill,peter).

parent(mary,jack).
parent(mary,george).
parent(mary,alice).

parent(paul,sophie).




ancestor(X,Y):-parent(X,Y).
ancestor(X,Y):-parent(X,Z), ancestor(Z,Y).







