The Thirsty Person Problem:
To drink, a thirsty person must have three things: water, ice, and a glass. There are thee thirsty each having a different one (and only one) of the three requirement items. A fourth person, a server, has an unlimited supply of all three items. If nobody is drinking, the server places two of the three items (chosen at random) onto a table.
The thirsty person who can make a drink from those two items will pick them up and drink a glass of ice water. Write a monitor to control the thirsty people and the server.