I'm having trouble with part of a build I have to do for an alarm system circuit. The Boolean code is I = M.(A + B + C + D + E). The +s are ORs, . is AND, and I'm using 2-input OR gates and 2-input AND gates. When M, the master switch, is on, and any of the sensors A,B,C,D or E are triggered, then the alarm will go off i.e. LED lights up. I need to latch the output signal once the alarm has been triggered and the latched condition should require a cycle of the master switch to reset the alarm i.e. LED stays lit until reset. I have to do this using 1 OR and 1 AND gate. I can't use an SR-latch. All I know is that I need to loop the AND and OR gate to get feedback/memory so the alarm/LED will stay on until reset, at which point reset LED will light up. Not sure how to do this.
Here's a pic of the circuit I've built so far.

As I said I'm not sure what way to connect the looped AND and OR gate to get the desired result.
I'd really appreciate some help as it's driving me bananas at this point..
ps I got some help on this forum recently as regards latching and since then I've been playing around a lot with the ciruit but I genuinely can't get it to work.
 
     
    
