( ( Mechanical waves ) ( ( ( need ( a medium ) ) ( through ( which ( to ( transport energy ) ) ) ) ) . ) )
(ROOT (S (NP (JJ Mechanical) (NNS waves)) (VP (VBP need) (NP (DT a) (NN medium)) (PP (IN through) (SBAR (WHNP (WDT which)) (S (VP (TO to) (VP (VB transport) (NP (NN energy)))))))) (. .)))
Mechanical waves need a medium through which to transport energy.
(ROOT (S (NP (NP (NNP Matter)) (SBAR (IN that) (S (NP (JJ mechanical) (NN wave) (NN energy)) (VP (MD can) (ADVP (RB only)) (VP (VB travel) (PRT (RP through))))))) (VP (VBZ is) (ADJP (JJ medium))) (. .)))
Matter that mechanical wave energy can only travel through is medium.