Five passengers are being seated on a plane with five open seats. There are four columns of seats and five rows. The columns are labeled 'A' through 'D' left to right, and the rows are labeled 1-5 front to back.
The following seats are open:
(1, C)
(3, B)
(3, C)
(4, A)
(5, B)
Seat preferences
Bert prefers to be seated in the front, next to a window.
Sandra prefers to be seated in the back, and in an aisle seat.
Alex prefers to be seated in the back, next to a window.
Pranav prefers to be seated in the back, away from a window.
Sam prefers to be in an aisle seat.
Please write the necessary data structures to describe the passengers and the open seats. Next, write a program to organize as many as possible into the seat that fits them best.