Several logic questions about flows through system software were asked; explain how you would reason through those flows when testing.
Implement simulate_flows(transitions, flows, start_state). Each transition contains from, event, and to. For each flow, apply an exact event rule before a wildcard "*" rule; if neither exists, record the event index and leave the state unchanged. Return each flow's final state and invalid-event indices.
Input and output shapes are defined by the function signature and examples.
def simulate_flows(transitions, flows, start_state):