Each ticket office is allowed a queue.
Its maximum length is QueueCapacity1 and QueueCapacity2 installed 10 people.
When a new application is received, its processing is performed order:
if a client of the first type arrives and the queue to the first cash desk is not complete, then the customer is put into this queue, otherwise, if the queue is not full to the 2 ticket offices, it goes to the queue to the cashier №2;
if both queues are full, then the client proceeds to the ticket machine;
if a second type client arrives and the queue to the second ticket office is not complete, the client "Placed" there, otherwise it goes to the vending machine to purchase a ticket.