/**
 * Given a list of actors/actresses, this function checks if the actor at the given index exists and starts with a consonant.
 * If it satisfies both conditions, it returns the name of the actor, otherwise it returns null.
 */
fun name(actorList: List<String?>, index: Int): String? {

    val vowels = listOf('A', 'a', 'E', 'e', 'I', 'i', 'O', 'o', 'U', 'u')

    if (index in 0 until actorList.size) {
        if (actorList[index]?.get(0) !in vowels) {
            return actorList[index]
        }
    }
    return null
}
/**
 * Given a list of actors/actresses, this function checks if the actor at the given index exists and starts with a consonant.
 * If it satisfies both conditions, it returns the name of the actor, otherwise it returns null.
 */
fun name(actorList: List<String?>, index: Int): String? {
/**
 * Given a list of actors/actresses, this function checks if the actor at the given index exists and starts with a consonant.
 * If it satisfies both conditions, it returns the name of the actor, otherwise it returns null.
 */
fun name(actorList: List<String?>, index: Int): String? {

    val vowels = listOf('A', 'a', 'E', 'e', 'I', 'i', 'O', 'o', 'U', 'u')

    if (index in 0 until actorList.size) {
        if (actorList[index]?.get(0) !in vowels) {
            return actorList[index]
        }
    }
    return null
}