Heat to work or thermal energy to work? A system consists of different forms of energy like thermal energy, mechanical energy, chemical energy, nuclear energy etc. If these energies are to be transferred to another system (call it system 2), it can either be done as heat or work (or mass but here I take system approach) and again at the other system (system 2) it will be held as (change the) one of the forms of energy (thermal, mechanical chemical etc).   
So when the second law implies that heat cannot be completely converted to work is it actually implying that thermal energy of a system cannot be completely transferred as work to another system? or does it mean energy that is transferring as heat cannot be changed to transfer-of-energy-as-work mid transfer?
It cannot be about the quality of energy because heat and work are not energy they just imply transfer of energy.  
 A: The 2nd law implies that heat can't be completely converted to work using a cyclic process.  Obviously, heat can be converted to work if the process does not have to be cyclic.  An example is isothermal reversible expansion of an ideal gas.
A: @Chester Miller So if energy is transferred to a system(as heat or work) and there is no transfer of energy from this system, then the energy transferred to the system will be saved as one of the forms of energy of the system ie increase the energy of the system(which may be thermal energy, mechanical energy, chemical energy etc). If the energy transfer was as work then this can be completely be saved as either mechanical energy of the system or thermal energy of the system (we won't consider other energy of the system). But if the energy transfer was as heat then this can be saved completely as the thermal energy of the system but the energy transferred cannot be completely be saved as mechanical energy. Is this the case or can the complete energy transferred to the system as heat can also be saved as mechanical energy of the system?(as mechanical energy can be completely be changed to work easily)
