Assuming that the message wire does not reset the bits after each sending cycle done, the message will be AABB read here for first 4 seconds.
Explanation :
As your friend is setting the bit after two seconds so the same message will be read by you when you will check second time expecting new bit set by him.
So...
After first second it will be A.
Second second it will be A again because the friend has not set the bits for new message and same message will be in the wire.
Third second the wire will have B as the bits were set this time considering the message is set by the friend after each 2 seconds.
Forth time it will be same B because no bits are set for new message in the wire.