Solution:
Cerebral ganglia are dorsal to the pharynx in the earthworm.
The nerve cord in the anterior region (3rd and 4th segments) bifurcates, laterally encircling the pharynx and joins the cerebral ganglia dorsally to form a nerve ring. The cerebral ganglia along with other nerves in the ring integrate sensory input as well as command muscular responses of the body.