/**
 * This function performs left shift and right shift operations on a given tuple.
 *
 * @param t The input tuple.
 * @param n The number of shifts.
 * @return The modified tuple after performing the shifts.
 */
fun tupleShiftOperations(t: List<Any>, n: Int): Pair<List<Any>, List<Any>> {

    val length = t.size
    val leftShifted = t.subList(n % length, length) + t.subList(0, n % length)
    val rightShifted = t.subList(length - n % length, length) + t.subList(0, length - n % length)

    return Pair(leftShifted, rightShifted)
}
/**
 * This function performs left shift and right shift operations on a given tuple.
 *
 * @param t The input tuple.
 * @param n The number of shifts.
 * @return The modified tuple after performing the shifts.
 */
fun tupleShiftOperations(t: List<Any>, n: Int): Pair<List<Any>, List<Any>> {
/**
 * This function performs left shift and right shift operations on a given tuple.
 *
 * @param t The input tuple.
 * @param n The number of shifts.
 * @return The modified tuple after performing the shifts.
 */
fun tupleShiftOperations(t: List<Any>, n: Int): Pair<List<Any>, List<Any>> {

    val length = t.size
    val leftShifted = t.subList(n % length, length) + t.subList(0, n % length)
    val rightShifted = t.subList(length - n % length, length) + t.subList(0, length - n % length)

    return Pair(leftShifted, rightShifted)
}