The only way for a child to have blue eyes is to inherit blue-eye genes from both parents.
(a child; to have; blue eyes) (The only way for a child to have blue eyes; is; to inherit blue-eye genes from both parents)
a child The only way for a child to have blue eyes
to have is
blue eyes
to inherit blue-eye genes from both parents