A programmable relay would probably have enough inputs and outputs.