/**
 * This function takes two lists and merges them together by performing list slicing and left and right shift operations.
 * The resulting merged list is returned.
 */
fun mergeLists(lst1: List<Int>, lst2: List<Int>): List<Int> {

    // Extract every second element from lst1, starting from the first element
    val slicedLst1 = lst1.filterIndexed { index, _ -> index % 2 == 0 }

    // Extract every third element from lst2, starting from the last element
    val slicedLst2 = lst2.filterIndexed { index, _ -> index % 3 == 0 }

    // Shift lst1 to the left twice
    val shiftedLst1 = lst1.drop(2)

    // Shift lst2 to the right three times
    val shiftedLst2 = lst2.dropLast(3)

    // Merge the sliced and shifted lists together
    val mergedList = slicedLst1 + slicedLst2 + shiftedLst1 + shiftedLst2

    return mergedList
}
/**
 * This function takes two lists and merges them together by performing list slicing and left and right shift operations.
 * The resulting merged list is returned.
 */
fun mergeLists(lst1: List<Int>, lst2: List<Int>): List<Int> {
/**
 * This function takes two lists and merges them together by performing list slicing and left and right shift operations.
 * The resulting merged list is returned.
 */
fun mergeLists(lst1: List<Int>, lst2: List<Int>): List<Int> {

    // Extract every second element from lst1, starting from the first element
    val slicedLst1 = lst1.filterIndexed { index, _ -> index % 2 == 0 }

    // Extract every third element from lst2, starting from the last element
    val slicedLst2 = lst2.filterIndexed { index, _ -> index % 3 == 0 }

    // Shift lst1 to the left twice
    val shiftedLst1 = lst1.drop(2)

    // Shift lst2 to the right three times
    val shiftedLst2 = lst2.dropLast(3)

    // Merge the sliced and shifted lists together
    val mergedList = slicedLst1 + slicedLst2 + shiftedLst1 + shiftedLst2

    return mergedList
}