A thermodynamic system undergoes a cyclic process as shown in the figure. In each of the loops 1 and 2, does the heat flow into or out of the system?