pat(a,b,c):-write(abc), nl. pat(X,b,X):-write('XbX'), nl. pat(_,_,_):-write(huh),nl.