They asked why we use virtual destructors, what is RAII etc.
Implement a simulator that returns destruction and resource-release events for polymorphic objects. Destruction must follow reverse construction order, derived-to-base destructor order, and RAII cleanup order. When the base destructor is non-virtual, only the static type's destructor chain executes.
Function: simulate_destruction(classes, objects, virtual_destructor).
classes maps each class name to {base, resources}, objects is construction-order data containing id, dynamic_type, and static_type, and the output is a list of event strings.
def simulate_destruction(classes, objects, virtual_destructor):