Optimal reactor structures for exothermic reversible reactions with complex kinetics