/**
 * This function searches for a specific name in a list of items given by the archaeologist.
 *
 * @param name The name to search for in the items list.
 * @param items The list of items provided by the archaeologist.
 * @return The index of the first occurrence of the name in the items list.
 *
 * Example:
 * archaeologistLookup("artifact", listOf("pottery", "stone", "artifact", "bone", "artifact")) // 2
 * archaeologistLookup("pyramid", listOf("skeleton", "ruins", "pyramid", "hieroglyphics")) // 2
 * archaeologistLookup("mummy", listOf("burial", "hieroglyphics", "mummy", "scrolls", "amulet")) // 2
 */
fun archaeologistLookup(name: String, items: List<String>): Int {

    var index = 0
    while (index < items.size) {
        if (items[index] == name) {
            return index
        }
        index++
    }
    return -1
}

val names = listOf("pottery", "stone", "artifact", "bone", "tools", "pottery", "artifact", "artifact", "coins")
/**
 * This function searches for a specific name in a list of items given by the archaeologist.
 *
 * @param name The name to search for in the items list.
 * @param items The list of items provided by the archaeologist.
 * @return The index of the first occurrence of the name in the items list.
 *
 * Example:
 * archaeologistLookup("artifact", listOf("pottery", "stone", "artifact", "bone", "artifact")) // 2
 * archaeologistLookup("pyramid", listOf("skeleton", "ruins", "pyramid", "hieroglyphics")) // 2
 * archaeologistLookup("mummy", listOf("burial", "hieroglyphics", "mummy", "scrolls", "amulet")) // 2
 */
fun archaeologistLookup(name: String, items: List<String>): Int {
/**
 * This function searches for a specific name in a list of items given by the archaeologist.
 *
 * @param name The name to search for in the items list.
 * @param items The list of items provided by the archaeologist.
 * @return The index of the first occurrence of the name in the items list.
 *
 * Example:
 * archaeologistLookup("artifact", listOf("pottery", "stone", "artifact", "bone", "artifact")) // 2
 * archaeologistLookup("pyramid", listOf("skeleton", "ruins", "pyramid", "hieroglyphics")) // 2
 * archaeologistLookup("mummy", listOf("burial", "hieroglyphics", "mummy", "scrolls", "amulet")) // 2
 */
fun archaeologistLookup(name: String, items: List<String>): Int {

    var index = 0
    while (index < items.size) {
        if (items[index] == name) {
            return index
        }
        index++
    }
    return -1
}

val names = listOf("pottery", "stone", "artifact", "bone", "tools", "pottery", "artifact", "artifact", "coins")