I have attached two images from my textbook one of which is a diagram and the other a paragraph with which I am having problems. The last sentence mentions that due to violation of 2nd law we cannot convert all the heat to work in this thermodynamic cycle. However what is preventing the carnot cycles from doing work dW_i ? Shouldn't ΔW be the only work that is impossible to achieve by the machine? Why take ∑dW_i + ΔW <=0 and not just ΔW<=0? I would also like to know that since at the end of one cycle reservoir the system returns to it's initial state and T loses some heat and if total work performed by that system is zero(for reversible case) then where does the heat go?