/**
 * Given a list of pairs representing musician and their instrument,
 * find the musicians who have not specified an instrument.
 *
 * @param tuples A list of pairs, where each pair represents a musician and an instrument.
 *               The musician is represented by a string and the instrument is represented by 'null'
 *               if no instrument is specified.
 * @return A list of musicians who have not specified an instrument.
 *
 * Examples:
 * musicians = listOf(Pair("John", "Guitar"), Pair("Paul", null), Pair("George", "Bass"), Pair("Ringo", "Drums"))
 * findEmptyInstrument(musicians) // Output: ["Paul"]
 */
fun findEmptyInstrument(tuples: List<Pair<String, String?>>): List<String> {

    val emptyInstruments = mutableListOf<String>()

    // Iterate over each pair in the list
    for ((musician, instrument) in tuples) {
        // Check if the instrument is null
        if (instrument == null) {
            emptyInstruments.add(musician)
        }
    }

    return emptyInstruments
}
/**
 * Given a list of pairs representing musician and their instrument,
 * find the musicians who have not specified an instrument.
 *
 * @param tuples A list of pairs, where each pair represents a musician and an instrument.
 *               The musician is represented by a string and the instrument is represented by 'null'
 *               if no instrument is specified.
 * @return A list of musicians who have not specified an instrument.
 *
 * Examples:
 * musicians = listOf(Pair("John", "Guitar"), Pair("Paul", null), Pair("George", "Bass"), Pair("Ringo", "Drums"))
 * findEmptyInstrument(musicians) // Output: ["Paul"]
 */
fun findEmptyInstrument(tuples: List<Pair<String, String?>>): List<String> {
/**
 * Given a list of pairs representing musician and their instrument,
 * find the musicians who have not specified an instrument.
 *
 * @param tuples A list of pairs, where each pair represents a musician and an instrument.
 *               The musician is represented by a string and the instrument is represented by 'null'
 *               if no instrument is specified.
 * @return A list of musicians who have not specified an instrument.
 *
 * Examples:
 * musicians = listOf(Pair("John", "Guitar"), Pair("Paul", null), Pair("George", "Bass"), Pair("Ringo", "Drums"))
 * findEmptyInstrument(musicians) // Output: ["Paul"]
 */
fun findEmptyInstrument(tuples: List<Pair<String, String?>>): List<String> {

    val emptyInstruments = mutableListOf<String>()

    // Iterate over each pair in the list
    for ((musician, instrument) in tuples) {
        // Check if the instrument is null
        if (instrument == null) {
            emptyInstruments.add(musician)
        }
    }

    return emptyInstruments
}