I had trouble keeping track of the network topology, so I resorted to a depth-first search strategy. The message queue on the right is helpful!