/**
 * Given a list of historical events and a list of unwanted events, remove all occurrences of the unwanted events
 * from the list of historical events.
 *
 * @param historicalEvents List of strings representing historical events.
 * @param unwantedEvents List of strings representing unwanted historical events.
 * @return Modified list of historical events with unwanted events removed.
 */
fun removeElements(historicalEvents: MutableList<String>, unwantedEvents: List<String>): MutableList<String> {

    // Iterate over the unwanted events and remove all occurrences from the historical events list
    for (event in unwantedEvents) {
        while (event in historicalEvents) {
            historicalEvents.remove(event)
        }
    }
    return historicalEvents
}
/**
 * Given a list of historical events and a list of unwanted events, remove all occurrences of the unwanted events
 * from the list of historical events.
 *
 * @param historicalEvents List of strings representing historical events.
 * @param unwantedEvents List of strings representing unwanted historical events.
 * @return Modified list of historical events with unwanted events removed.
 */
fun removeElements(historicalEvents: MutableList<String>, unwantedEvents: List<String>): MutableList<String> {
/**
 * Given a list of historical events and a list of unwanted events, remove all occurrences of the unwanted events
 * from the list of historical events.
 *
 * @param historicalEvents List of strings representing historical events.
 * @param unwantedEvents List of strings representing unwanted historical events.
 * @return Modified list of historical events with unwanted events removed.
 */
fun removeElements(historicalEvents: MutableList<String>, unwantedEvents: List<String>): MutableList<String> {

    // Iterate over the unwanted events and remove all occurrences from the historical events list
    for (event in unwantedEvents) {
        while (event in historicalEvents) {
            historicalEvents.remove(event)
        }
    }
    return historicalEvents
}