The good people at ACME fundraisers are planning a fundraising ball, including dinner, and need a way to allocate people to tables. Since they are hoping for millions of people to attend they will be using a computer in order to organise the table layouts. Each table is a rectangle that seats people on either side. You should be given a list of people, the available tables and preferences, and you must calculate a seating plan. We will use the term 'close' in order to refer to five spaces around person, or three if one is seated at the end of a table. Seating preferences are in the form of likes, dislikes, loves and hates. If one person likes another, they must be sat at the same table, if one person hates another, they must be sat at different tables. If a person loves another they must be sat nearby, at the same table, if they dislike, they may be sat at the same table, but not nearby.