If you have not already done so, do the exercise about family relationships.
Extend the family tree that you defined in that exercise by adding great-grandparents for Harry.
Now, define a predicate ancestor_of/2. ancestor_of(X,Y) should be true if X is an ancestor of Y. Your predicate definition should work correctly even if you add Harry's great-great-grandparents, his great-great-great-grandparents, his great-great-... to the knowledge base.
Ask queries to test your definition. For example:
If Prolog does not come back with an answer, it has probably gone off into an endless loop. Stop it by pressing Ctrl-c. Then type a to abort.