Uni student #2: You've got to create a base case for your predicate. Otherwise it just backtracks up the list and down again.
Uni student #1: Thanks. Fuck. I don't know if I'm gonna pass this course.
Uni student #2: Don't worry. It's not as if this shit is useful anyway.
grandfather(X,Z) <= parents(X, Y), parents(Y, Z).