/**
 * This function searches for the given searchKey in the nested tuples of data.
 *
 * Each tuple in the data is checked to see if it contains the searchKey. If the tuple itself is a tuple containing
 * other tuples, the function recursively searches through the nested tuples until it finds the searchKey or exhausts
 * all tuples.
 *
 * @param data A tuple containing nested tuples.
 * @param searchKey An integer to search for in the nested tuples.
 * @return True if the searchKey is found in any of the nested tuples, false if the searchKey is not found in any of the nested tuples.
 */
fun searchData(data: List<Any>, searchKey: Int): Boolean {

    for (item in data) {
        if (item is List<*>) {
            if (searchData(item as List<Any>, searchKey)) {
                return true
            }
        } else {
            if (item == searchKey) {
                return true
            }
        }
    }
    return false
}
/**
 * This function searches for the given searchKey in the nested tuples of data.
 *
 * Each tuple in the data is checked to see if it contains the searchKey. If the tuple itself is a tuple containing
 * other tuples, the function recursively searches through the nested tuples until it finds the searchKey or exhausts
 * all tuples.
 *
 * @param data A tuple containing nested tuples.
 * @param searchKey An integer to search for in the nested tuples.
 * @return True if the searchKey is found in any of the nested tuples, false if the searchKey is not found in any of the nested tuples.
 */
fun searchData(data: List<Any>, searchKey: Int): Boolean {
/**
 * This function searches for the given searchKey in the nested tuples of data.
 *
 * Each tuple in the data is checked to see if it contains the searchKey. If the tuple itself is a tuple containing
 * other tuples, the function recursively searches through the nested tuples until it finds the searchKey or exhausts
 * all tuples.
 *
 * @param data A tuple containing nested tuples.
 * @param searchKey An integer to search for in the nested tuples.
 * @return True if the searchKey is found in any of the nested tuples, false if the searchKey is not found in any of the nested tuples.
 */
fun searchData(data: List<Any>, searchKey: Int): Boolean {

    for (item in data) {
        if (item is List<*>) {
            if (searchData(item as List<Any>, searchKey)) {
                return true
            }
        } else {
            if (item == searchKey) {
                return true
            }
        }
    }
    return false
}