This is a problem from the JMBO 1998 competition. It was surprisingly difficult even though I had a n idea of what to do. The main strategy was to create as many constraints to narrow the options.