substitute equal valences