Complex sentence: Not all thermal energy can be transformed into mechanical power, according to the second law of thermodynamics; therefore, there is always heat lost to the environment.
Split into simpler sentences: Not all thermal energy can be transformed into mechanical power, according to the second law of thermodynamics. Therefore, there is always heat lost to the environment.