The mountains on both sides of the river crumble forming a dam which stops the flooding.
(The mountains on both sides of the river; crumble forming; a dam which stops the flooding) (a dam; stops; the flooding)
The mountains on both sides of the river a dam
crumble forming stops
a dam which stops the flooding
the flooding