include "alldifferent.mzn"; % Variables var 1..9: T; var 0..9: W; var 0..9: O; var 1..9: F; var 0..9: U; var 0..9: R; var 0..1: Re1; var 0..1: Re2; %Set of constraints constraint 2*O = R + 10*Re1; constraint 2*W + Re1 = U + 10*Re2; constraint 2*T + Re2 = O + 10*F; constraint alldifferent([T,W,O,F,U,R]); solve satisfy;