Describe a time you were asked to build a small project to simulate a particular system. For this coding exercise, model the system as a deterministic state machine: each event may transition the system from its current state to another state. Return the state after every event, leaving the state unchanged when no transition is defined. Implement simulate_system(initial_state, transitions, events), where initial_state is a string, transitions maps states to event-to-state mappings, and events is a list of strings. Return a list of resulting state strings.
def simulate_system(initial_state, transitions, events):