/**
 * This exercise requires the creation of a function that concatenates two lists into a single list in a specific order.
 */
fun concatenateLists(list1: List<Any>, list2: List<Any>): List<Any> {

    // Check if the input lists are of equal length
    if (list1.size == list2.size) {
        // Create an empty list to store the concatenated result
        val concatenatedList = mutableListOf<Any>()

        // Iterate over the elements in the lists
        for (i in list1.indices) {
            // Concatenate the elements in a specific order
            if (i % 2 == 0) {
                concatenatedList.add(list1[i])
                concatenatedList.add(list2[i])
            } else {
                concatenatedList.add(list2[i])
                concatenatedList.add(list1[i])
            }
        }

        return concatenatedList
    } else {
        return listOf("The input lists must be of equal length.")
    }
}
/**
 * This exercise requires the creation of a function that concatenates two lists into a single list in a specific order.
 */
fun concatenateLists(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This exercise requires the creation of a function that concatenates two lists into a single list in a specific order.
 */
fun concatenateLists(list1: List<Any>, list2: List<Any>): List<Any> {

    // Check if the input lists are of equal length
    if (list1.size == list2.size) {
        // Create an empty list to store the concatenated result
        val concatenatedList = mutableListOf<Any>()

        // Iterate over the elements in the lists
        for (i in list1.indices) {
            // Concatenate the elements in a specific order
            if (i % 2 == 0) {
                concatenatedList.add(list1[i])
                concatenatedList.add(list2[i])
            } else {
                concatenatedList.add(list2[i])
                concatenatedList.add(list1[i])
            }
        }

        return concatenatedList
    } else {
        return listOf("The input lists must be of equal length.")
    }
}