Preimage problems for reaction systems