If frictional forces are present, then some of the work must go to overcome friction and appears finally in the form of heat energy.
(frictional forces; are; present) (some of the work; to overcome; friction) (some of the work; appears; T:finally; L:in the form of heat energy)
frictional forces some of the work some of the work
are to overcome appears
present
friction
T:finally L:in the form of heat energy