...



  .
(a)  ( 2( 1, , 2), X, 2( 1, , 2) );
(b)  ( 2( 1, , 2), X,
                        3( 1, , 1, , 2) );
(c)  ( 3( 1, 2, 2, 3, 3), X,
                        2( 1, , 1), 2, 2( 2, 3, 3) ).




line();

% 2-3

        23( , X, 1) :-             % , 1
                ( , X, 1).        %

        23( , X, 2( 1, 2, 2) ) :-
                ( , X, 1, 2, 2).
        %

        23( nil, X, ( ) ).

        ( ( ), X, ( ), X, ( ) ) :-
                ( X, ).

        ( ( ), X, ( ), , ( ) ) :-
                ( , X).

        ( 2( 1, , 2), X, 2( 1, , 2) ) :-
                ( , X),
                ( 1, X, 1).

        ( 2( 1, , 2), , 3( 1, , 1, , 2) ) :-
                ( , X),
                ( 1, X, 1, , 1).

        ( 2( 1, , 2), X, 2( 1, , 2) ) :-
                ( X, ),
                ( 2, X, 2).

        ( 2( 1, , 2), , 3( 1, , 2, , 2) ) :-
                ( X, ),
                ( 2, X, 2, , 2).

        ( 3( 1, 2, 2, 3, 3), , 3( 1, 2, 2, 3, 3) :-
                ( 2, X),
                ( 1, X, 1).

        ( 3( 1, 2, 2, 3, 3), X,
                2( 1, , 1), 2, 2( 2, 3, 3) ) :-
                ( 2, X),
                ( 1, X, 1, , 1).

        ( 3( 1, 2, 2, 3, 3), X,
                3( 1, 2, 2, 3, 3) ) :-
                ( X, 2), ( 3, X),
                ( 2, X, 2).

        ( 3( 1, 2, 2, 3, 3), X,
                2( 1, 2, 2), , 2( 2, 3, 3) ) :-
                ( X, 2), ( 3, X),
                ( 2, X, 2, , 2).

        ( 3( 1, 2, 2, 3, 3), X,
                3( 1, 2, 2, 3, 3) ) :-
                ( X, 3),
                ( 3, X, 3).

        ( 3( 1, 2, 2, 3, 3), X,
                2( 1, 2, 2), 3, 2( 3, , 3) ) :-
                ( X, 3),
                ( 3, X, 3, , 3).

line();