Four women-G, H, I, and J-and four men-R, S, T, and U-are the eight people to be seated at a rectangular table. Three of the people are to sit on one side of the table, three are to sit on the other side of the table, one is to sit at the head of the table, and one is to sit at the foot of the table. The following restrictions on seating arrangements must be observed: