/**
 * Given a list of lunar phases (new moon, first quarter, full moon, last quarter),
 * and an integer n, return the n-th lunar phase.
 *
 * @param phases A list of strings representing the lunar phases.
 * @param n The index of the desired lunar phase.
 * @return The n-th lunar phase.
 *
 * Example:
 * findLunarPhases(listOf("New Moon", "First Quarter", "Full Moon", "Last Quarter"), 2) returns "Full Moon"
 */
fun findLunarPhases(phases: List<String>, n: Int): String {

    // Shift the list elements to the left by n positions
    val shiftedPhases = phases.drop(n) + phases.take(n)
    
    // Access and return the element at index 0 of the shifted list
    return shiftedPhases[0]
}
/**
 * Given a list of lunar phases (new moon, first quarter, full moon, last quarter),
 * and an integer n, return the n-th lunar phase.
 *
 * @param phases A list of strings representing the lunar phases.
 * @param n The index of the desired lunar phase.
 * @return The n-th lunar phase.
 *
 * Example:
 * findLunarPhases(listOf("New Moon", "First Quarter", "Full Moon", "Last Quarter"), 2) returns "Full Moon"
 */
fun findLunarPhases(phases: List<String>, n: Int): String {
/**
 * Given a list of lunar phases (new moon, first quarter, full moon, last quarter),
 * and an integer n, return the n-th lunar phase.
 *
 * @param phases A list of strings representing the lunar phases.
 * @param n The index of the desired lunar phase.
 * @return The n-th lunar phase.
 *
 * Example:
 * findLunarPhases(listOf("New Moon", "First Quarter", "Full Moon", "Last Quarter"), 2) returns "Full Moon"
 */
fun findLunarPhases(phases: List<String>, n: Int): String {

    // Shift the list elements to the left by n positions
    val shiftedPhases = phases.drop(n) + phases.take(n)
    
    // Access and return the element at index 0 of the shifted list
    return shiftedPhases[0]
}