You are part of an elite hacking group who has just invented a new type of malware, called the hoppers. Hoppers can operate in any high-security computer networks; however, they can only propagate themselves in a very limited way.
A computer network is a set of hosts VV (|V|=N|V|=N) and direct links EE (|E|=M|E|=M). Each direct link connects two different hosts, allowing them to communicate in both directions. If a host uu is infected with a hopper, then it will propagate itself to all hosts WW where WW is the set of hosts which are connected to any neighbor of uu. Formally, W={w∣{(u,v),(v,w)}⊆E}W={w∣{(u,v),(v,w)}⊆E}. The newly-infected host wwcan now proceed to infect other hosts in the same manner.
You are trying to infect all hosts in a particular high-security network by compromising a single host. Of course, a compromised host will be infected with a hopper. Though it may be an impossible mission, you realize that you can trick the admini