AMD Interview Question

How would you build this circuit using only NAND gates