( 1, X, 1).



                ( 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) ) :-