The statement is: Consider an ideal gas with constant number of particles (N is constant), and an arbitrary thermodynamic cycle (closed curve with no self-interesections) in the PV diagram. Show that this cycle has an efficiency less or equal than a Carnot cycle operating between the maximun and minimum temperatures the arbitrary cycle reaches.

We are not supposed to use machines, so I can't do the regular proof by contradiction using a cycle that is more efficient attached to a reverted Carnot cycle as a refrigerator. I am stuck trying to figure out how to discern $Q_{out}$ from $Q_{in}$ in an arbitrary cycle, since I can't assume that $Q_{in}=\int\limits_{T_C}^{T_H} P dV$.