What Circuit Do I Need

Rank amateur here, hoping someone can point me in the right direction.

I need some kind of switching circuit, here are my parameters:

  1. I need a voltage (12v) running to either fan A or fan B (either way one fan is always on).
  2. When a signal is sent down line A (5v) I need fan A to turn on, and fan B to turn off.
  3. When a signal is sent down line B (5v) I need fan B to turn on, and fan A to turn off.
  4. BUT when the signal stops on either lines, I need that last fan that was switched on to stay on.

I cannot control the incoming signal. It's part of an existing arduino project that I can't change it's software, I just sort of want to 'tap into the pins' with a custom shield with my circuit. The signal down lines A and B is always either/or, never at the same time.

Is there a way to do this with ordinary components from radioshack? (without another microcontroller)

Right now the only way I can think of is to program another microcontroller, like an attiny, to control a pair of fets. That would be easy enough for me to execute but requires mail order.

Couple of relays and transistors to sink the coil current, diode across the coil.
Set/Reset flip flop, with Q and Q/ outputs controlling the transistor.

May need to invert the incoming signals so that inactive state ("when the signal stops") is a high level, not a low level.
Use a 4 x 2-input NAND gate. Wire 2 as the flip flop, wire 2 as signal inverters to feed the flip flop input.

Ah, I knew it was simply a matter of googling the right terms. Thank you, CrossRoads.