import choco.Problem;
import choco.Constraint;
import choco.Solver;
import choco.Solution;
import choco.ContradictionException;
import choco.integer.IntVar;
import choco.search.AssignVar;

import java.io.*;
import java.lang.*;
import java.util.*;

public class Test {	
   

    public static void main(String[] args) throws Exception,ContradictionException {

	Problem pb = new Problem();

	IntVar ab = pb.makeEnumIntVar("ab",0,2);
	IntVar ac = pb.makeEnumIntVar("ac",0,2);
	IntVar bc = pb.makeEnumIntVar("bc",0,2);
	/*
	Constraint U1 = pb.and(pb.eq(ab,ac),pb.and(pb.gt(bc,ac),pb.gt(bc,ab)));
	Constraint U2 = pb.and(pb.eq(ab,bc),pb.and(pb.gt(ac,bc),pb.gt(ac,ab)));
	Constraint U3 = pb.and(pb.eq(ac,bc),pb.and(pb.gt(ab,bc),pb.gt(ab,ac)));
	Constraint U4 = pb.and(pb.eq(ab,ac),pb.and(pb.eq(ac,bc),pb.eq(ab,bc)));
	*/
	Constraint U1 = pb.and(pb.eq(ab,ac),pb.gt(bc,ac));
	Constraint U2 = pb.and(pb.eq(ab,bc),pb.gt(ac,bc));
	Constraint U3 = pb.and(pb.eq(ac,bc),pb.gt(ab,bc));	
	Constraint U4 = pb.and(pb.eq(ab,ac),pb.eq(ac,bc));

	Constraint U5 = pb.or(pb.or(U1,U2),(pb.or(U3,U4)));

	pb.post(U5);

	
	if (pb.solve().booleanValue()){
	    System.out.println(pb.pretty());
	    while (pb.nextSolution().booleanValue()){
		System.out.println(pb.pretty());
	    }
	}

	// pb.solve(true);
    }
}
