In our dental clinic there are 3 dental hygienists, 3 chairs for patients and a waiting area. In the waiting area there is a sofa for 4 waiters, and the rest of the waiters are standing. Total in the clinic can be no more than N patients (those in treatment and those in waiting together) No one will enter the clinic if there are already N patients there. Inside, a patient sits in a therapeutic chair or sits on the couch or stands, if the couch is occupied. when are One of the dentists vacates, waiting to sit on the couch the longest time approaching her For treatment. If there are currently patients standing, one that has stood in line for the longest time Sits on the couch. When a patient's treatment is over, the medic can get paid from him, but because there is only a cash register One, payment is only made for one patient at a time. The dentists divide their time between caring for patients, receiving payment and sleeping in their chairs When they are waiting for patients.
*/To sum up:* Patients perform the following actions: Entrance to the clinic, sitting on the couch, receiving treatment, payment The dental hygienists perform the following actions: Patient care, receiving payment, sleeping A patient cannot enter the clinic if the clinic is full If the couch is full, the patient entering cannot sit on the couch When a patient receives treatment, one of the dental hygienists must perform treatment on the patient and vice versa Up to 3 patients can receive treatment and up to 3 dentists can perform treatment on the patient A patient must make a payment before a medic can make a payment A dental hygienist must make a payment before the patient leaves Please note - the duration of treatment is not important and has not been defined.