Third law of thermodynamics conundrum with cyclic machines 
Consider 3 objects, each with different heat capacities ($C_1$, $C_2$, $C_3$) and initial temperatures $T_1$, $T_2$, and $T_3$. Heat engines (HE1 and HE2) are placed between the objects to generate work, which powers a heat pump (HP) to transfer heat from object 2 to object 4. Are the final temperatures of objects 1, 2 and 3 all the same? Or is object 2 colder than objects 1 and 3?
I think the final temperatures of objects 1-3 should be the same, since the heat engines will keep running until there are no temperature differences. HE1 will run until $T_1 = T_2$, and HE2 will run until $T_2=T_3$. By the third law of thermodynamics, we therefore have $T_1=T_3$ at this final stage. I don't think the heat pump should influence this result.
Intuitively, however, it seems like object 2 should be colder in the final stage, since it is the only one rejecting heat to a heat pump. 
 A: I describe a similar example here in the context of three reservoirs, in which the associated heat engine runs one way (and only needs to run one way). The temperatures of two reservoirs are made equal using a reversible heat engine, and then the extracted energy is used to cool down both reservoirs using a heat pump to maximize the temperature of a third reservoir:


Your four-component system (for which I'll assume that initially T3 > T2 > T1) introduces an additional factor: can heat engine 1 run in reverse? If not, it's possible that the energy provided by heat engine 2 allows the heat pump to cool T2 below T1. In this case, T2 = T3, which is lower than T1, and T4 is not made as hot as it could be, since a temperature difference still exists among the first three components.
Even if heat engine 1 can operate in reverse (if necessary) but you restrict the order of operation (e.g., heat engine 1 must run before heat engine 2), then you may end up with an inefficient result in which T2 < T1 with no way to exploit this temperature difference.
However, if heat engine 1 can operate in reverse and you allow both heat engines to run as long as a temperature difference remains, then all temperature differences can be exploited among T1, T2, and T3 to make T4 as hot as possible. In this case, as you state, T1 = T2 = T3 ultimately.
