men([rick,jack,john,hugh,greg,nick,bill,andy,alan,dick]).
women([helen,tracy,linda,sally,wanda,maria,diana,patty,jenny,lilly]).

prefers(rick,[tracy,linda,jenny,maria,wanda,sally,diana,patty,helen,lilly]).
prefers(jack,[tracy,lilly,patty,sally,diana,linda,jenny,helen,maria,wanda]).
prefers(john,[diana,jenny,wanda,linda,patty,tracy,sally,helen,lilly,maria]).
prefers(hugh,[helen,wanda,diana,maria,sally,patty,linda,lilly,jenny,tracy]).
prefers(greg,[jenny,maria,lilly,patty,sally,linda,tracy,diana,helen,wanda]).
prefers(nick,[sally,linda,diana,maria,jenny,lilly,wanda,helen,patty,tracy]).
prefers(bill,[linda,tracy,diana,patty,lilly,sally,jenny,helen,wanda,maria]).
prefers(andy,[helen,jenny,lilly,maria,sally,patty,wanda,tracy,diana,linda]).
prefers(alan,[patty,sally,maria,jenny,linda,diana,helen,lilly,tracy,wanda]).
prefers(dick,[sally,wanda,helen,maria,lilly,diana,jenny,tracy,patty,linda]).
prefers(helen,[alan,rick,nick,bill,jack,hugh,dick,john,andy,greg]).
prefers(tracy,[andy,john,alan,hugh,bill,rick,greg,dick,jack,nick]).
prefers(linda,[dick,hugh,john,nick,andy,greg,alan,jack,bill,rick]).
prefers(sally,[nick,dick,bill,rick,greg,andy,jack,hugh,alan,john]).
prefers(wanda,[greg,bill,dick,jack,john,nick,alan,andy,rick,hugh]).
prefers(maria,[john,alan,nick,rick,greg,hugh,jack,bill,andy,dick]).
prefers(diana,[greg,hugh,andy,nick,john,bill,alan,dick,jack,rick]).
prefers(patty,[alan,bill,jack,hugh,greg,dick,rick,nick,andy,john]).
prefers(jenny,[greg,dick,jack,bill,alan,john,andy,hugh,rick,nick]).
prefers(lilly,[hugh,jack,dick,nick,andy,alan,greg,rick,bill,john]).
