child(anna,bridget).
child(bridget,caroline).
child(caroline,donna).
child(donna,emily).


descend1(X,Y):- child(X,Y).
descend1(X,Y):- child(X,Z), child(Z,Y).

descend2(X,Y):- child(X,Z), descend2(Z,Y).
descend2(X,Y):- child(X,Y).

descend3(X,Y):- descend3(Z,Y), child(X,Z).
descend3(X,Y):- child(X,Y).

descend4(X,Y):- child(X,Y).
descend4(X,Y):- descend4(Z,Y), child(X,Z).
