Design 2-input pulse-mode circuit that has two pulse inputs, A and B, and one pulse output, z. The output is coincident with
(a) the second of two consecutive B pulses immediately following exactly three consecutive A pulses and
(b) the second consecutive B pulse immediately following three or more A pulses.