/**
 * This function takes a set as input, iterates through it and performs slicing operations on its elements.
 *
 * @param setData The set to be iterated and sliced.
 */
fun iterateAndSliceSet(setData: Set<Any>) {

    // Convert the set to a list for slicing operations
    val setList = setData.toList()
    
    // Print the first element of the set using indexing
    println(setList[0])
    
    // Print the last element of the set using negative indexing
    println(setList[setList.size - 1])
    
    // Print the first three elements of the set using slicing
    println(setList.subList(0, 3))
}
/**
 * This function takes a set as input, iterates through it and performs slicing operations on its elements.
 *
 * @param setData The set to be iterated and sliced.
 */
fun iterateAndSliceSet(setData: Set<Any>) {
/**
 * This function takes a set as input, iterates through it and performs slicing operations on its elements.
 *
 * @param setData The set to be iterated and sliced.
 */
fun iterateAndSliceSet(setData: Set<Any>) {

    // Convert the set to a list for slicing operations
    val setList = setData.toList()
    
    // Print the first element of the set using indexing
    println(setList[0])
    
    // Print the last element of the set using negative indexing
    println(setList[setList.size - 1])
    
    // Print the first three elements of the set using slicing
    println(setList.subList(0, 3))
}