:-dlib_require(clp).
go:-
    write('% 3 Person A,B,C and 3 fruit apple,banana,orange exist'),nl,
    write('% They each choose the favorite fruit'),nl,
    write('% A dislikes banana'),nl,
    write('% B dislikes orange'),nl,
    write('% Show all the choice pairs of A,B,C'),nl,nl,

    P = [A,B,C],
    P in [apple,banana,orange],
    A #\= banana,
    B #\= orange,
    alldifferent(P),
    labeling(P),
      write(['A'=A,' B'=B,' C'=C]),nl,
    fail.
