<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">a(g,h).
a(g,d).
a(d,a).
a(e,d).
a(h,f).
a(h,f).
a(a,e).
a(e,f).
a(a,b).
a(b,f).

pathCic(X,Y):- pathC(X,Y,[]).

pathC(X,X,L).
pathC(X,Y,L):- a(X,Z), notvisited(Z,L), pathC(Z,Y,[Z|L]).

notvisited(Z,[]).
notvisited(Z,[X|Y]):- X\==Z, notvisited(Z,Y).
</pre></body></html>