The combination of NAND gates is shown in figure (I) and (II). For the given inputs, the outputs in both the combinations are respectively.