In the solution here, the server allows any process to send an ordered output message. An alternative approach is to allow only slave 0 to send a request to perform ordered output. Then the master can send a message to either slave 0 or to each slave, informing them that they can send the ordered output message.
You can implement this alternate approach by using the ring communication within the slaves to indicate which slave can send an ordered message next.