/**
 * Given a list of clients with their ages, remove all the clients whose age is greater than 65.
 *
 * @param clients A list of client objects, where each object has the format (name, age).
 * @return The modified list of clients after removing older clients.
 */
fun removeOlderClients(clients: MutableList<Pair<String, Int>>): List<Pair<String, Int>> {

    var i = 0
    while (i < clients.size) {
        val (name, age) = clients[i]
        if (age > 65) {
            clients.removeAt(i)
        } else {
            i++
        }
    }
    return clients
}

// Example usage
/**
 * Given a list of clients with their ages, remove all the clients whose age is greater than 65.
 *
 * @param clients A list of client objects, where each object has the format (name, age).
 * @return The modified list of clients after removing older clients.
 */
fun removeOlderClients(clients: MutableList<Pair<String, Int>>): List<Pair<String, Int>> {
/**
 * Given a list of clients with their ages, remove all the clients whose age is greater than 65.
 *
 * @param clients A list of client objects, where each object has the format (name, age).
 * @return The modified list of clients after removing older clients.
 */
fun removeOlderClients(clients: MutableList<Pair<String, Int>>): List<Pair<String, Int>> {

    var i = 0
    while (i < clients.size) {
        val (name, age) = clients[i]
        if (age > 65) {
            clients.removeAt(i)
        } else {
            i++
        }
    }
    return clients
}

// Example usage