The human digestive system lacks an enzyme necessary to break down certain substances in the beans, which ferment in the intestines until they are expelled as gas.
(The human digestive system; lacks; an enzyme necessary to break down certain substances in the beans,) (they; are expelled; as gas)
The human digestive system they
lacks are expelled
an enzyme necessary to break down certain substances in the beans,
as gas