/**
 * This function takes a list of integers and a target element to modify.
 * It removes any even numbers from the list and replaces the target element with the negative of itself.
 * Finally, it returns the modified list.
 *
 * @param listElements A list of integers.
 * @param targetElement The element to modify.
 * @return The modified list.
 */
fun modifyListElements(listElements: List<Int>, targetElement: Int): List<Int> {

    val modifiedList = mutableListOf<Int>()
    for (element in listElements) {
        if (element == targetElement) {
            modifiedList.add(-element)
        } else if (element % 2 != 0) {
            modifiedList.add(element)
        }
    }
    return modifiedList
}
/**
 * This function takes a list of integers and a target element to modify.
 * It removes any even numbers from the list and replaces the target element with the negative of itself.
 * Finally, it returns the modified list.
 *
 * @param listElements A list of integers.
 * @param targetElement The element to modify.
 * @return The modified list.
 */
fun modifyListElements(listElements: List<Int>, targetElement: Int): List<Int> {
/**
 * This function takes a list of integers and a target element to modify.
 * It removes any even numbers from the list and replaces the target element with the negative of itself.
 * Finally, it returns the modified list.
 *
 * @param listElements A list of integers.
 * @param targetElement The element to modify.
 * @return The modified list.
 */
fun modifyListElements(listElements: List<Int>, targetElement: Int): List<Int> {

    val modifiedList = mutableListOf<Int>()
    for (element in listElements) {
        if (element == targetElement) {
            modifiedList.add(-element)
        } else if (element % 2 != 0) {
            modifiedList.add(element)
        }
    }
    return modifiedList
}