/**
 * Given a nested list of photos and the name of a photographer,
 * return the name of the first photo taken by the given photographer.
 *
 * Each inner list will represent a photo which contains the name of the photographer at index 0.
 * The first photo taken by the photographer should be returned. If no match is found, return "Photographer not found".
 *
 * @param photos A nested list where each inner list represents a photo.
 * @param photographer The name of the photographer to search for.
 * @return The name of the first photo taken by the given photographer or "Photographer not found" if not present.
 */
fun accessNestedElements(photos: List<List<String>>, photographer: String): String {

    for (photo in photos) {
        if (photo.isNotEmpty() && photo[0] == photographer) {
            return photo[0]
        }
    }
    return "Photographer not found"
}
/**
 * Given a nested list of photos and the name of a photographer,
 * return the name of the first photo taken by the given photographer.
 *
 * Each inner list will represent a photo which contains the name of the photographer at index 0.
 * The first photo taken by the photographer should be returned. If no match is found, return "Photographer not found".
 *
 * @param photos A nested list where each inner list represents a photo.
 * @param photographer The name of the photographer to search for.
 * @return The name of the first photo taken by the given photographer or "Photographer not found" if not present.
 */
fun accessNestedElements(photos: List<List<String>>, photographer: String): String {
/**
 * Given a nested list of photos and the name of a photographer,
 * return the name of the first photo taken by the given photographer.
 *
 * Each inner list will represent a photo which contains the name of the photographer at index 0.
 * The first photo taken by the photographer should be returned. If no match is found, return "Photographer not found".
 *
 * @param photos A nested list where each inner list represents a photo.
 * @param photographer The name of the photographer to search for.
 * @return The name of the first photo taken by the given photographer or "Photographer not found" if not present.
 */
fun accessNestedElements(photos: List<List<String>>, photographer: String): String {

    for (photo in photos) {
        if (photo.isNotEmpty() && photo[0] == photographer) {
            return photo[0]
        }
    }
    return "Photographer not found"
}