Conditions stall

x send the incoming message Y. Y send the incoming message X ,X send the incoming message Z ,
can we prepare such a pyhton? STALL FOR :sweat_smile: