Figure 1:
Circuit with two types of gates.