N = 5;
M = 4;
v = 2;
f = 1;

1: {
     start: {
	send(msg_with(1), 2, 4);
     }
     ack_of(1): {
	send(msg_with(1), 3, 4);
	send(msg_with(1), 5, 1);
     }
}

2: {
     start: {
	send(msg_with(2), 3, 3);
     }
     msg_of(1): {
	send(msg_with(1, 2), 4, 4);
	send(ack_with(1), 1, 4);
	send(msg_with(2), 1, 3);
	send(msg_with(2) && ack_with(1), 3, 3);
     }
     ack_of(4): {
	send(ack_with(2), 4, 2);
	send(msg_with(2), 5, 2);
     }
}

3: {
     on_events(msg_of(1), msg_of(2)): {
	send(msg_with(3), 1, 2);
	send(msg_with(3), 4, 2);
	send(ack_with(4, 3), 4, 2);
        send(msg_with(3), 5 ,3);
     }
}

4: {
     on_events(msg_of(1), msg_of(2), ack_of(3)): {
	send(ack_with(1, 2), 2, 1);
	send(msg_with(4), 1, 1);
	send(ack_with(4), 2, 1);
	send(msg_with(4), 3, 1);
	send(msg_with(4), 5, 4);
     }
     ack_of(2): {
	send(msg_with(3, 4), 2, 1);
     }
}

5: {
	on_events(msg_of(1), msg_of(2), msg_of(3), msg_of(4)):
	{
		send(msg_with(5),1,1);
		send(msg_with(5),2,2);
		send(msg_with(5),3,3);
		/*send(msg_with(5),4,4);*/
	}


}
