/**
 * Write a function that takes a list of pairs representing books in a library. Each pair contains the book title and the author's last name.
 * The function should return a list of the last names of all the authors in the library.
 *
 * @param bookList A list of pairs representing books in the library. Each pair contains the book title and the author's last name.
 * @return A list of last names of all the authors in the library.
 */
fun getAuthorLastName(bookList: List<Pair<String, String>>): List<String> {

    val lastNames = mutableListOf<String>()
    for (book in bookList) {
        val lastName = book.second // Extracting the last name
        lastNames.add(lastName)
    }
    return lastNames
}
/**
 * Write a function that takes a list of pairs representing books in a library. Each pair contains the book title and the author's last name.
 * The function should return a list of the last names of all the authors in the library.
 *
 * @param bookList A list of pairs representing books in the library. Each pair contains the book title and the author's last name.
 * @return A list of last names of all the authors in the library.
 */
fun getAuthorLastName(bookList: List<Pair<String, String>>): List<String> {
/**
 * Write a function that takes a list of pairs representing books in a library. Each pair contains the book title and the author's last name.
 * The function should return a list of the last names of all the authors in the library.
 *
 * @param bookList A list of pairs representing books in the library. Each pair contains the book title and the author's last name.
 * @return A list of last names of all the authors in the library.
 */
fun getAuthorLastName(bookList: List<Pair<String, String>>): List<String> {

    val lastNames = mutableListOf<String>()
    for (book in bookList) {
        val lastName = book.second // Extracting the last name
        lastNames.add(lastName)
    }
    return lastNames
}