/**
 * A code completion exercise for an athlete navigating obstacles on a number line representation.
 *
 * The athlete is positioned on a number line and needs to reach a target position while avoiding obstacles.
 * We need to determine whether the athlete should move left, right, or stay in the same position based on the
 * positions of the obstacles. Complete the code to solve the exercise.
 *
 * @param athletePosition The current position of the athlete on the number line.
 * @param obstaclePositions The position of the obstacles on the number line (can be a list of positions).
 * @param targetPosition The target position the athlete wants to reach on the number line.
 * @return The direction the athlete should take: 'left', 'right', or 'stay'.
 */
fun name(athletePosition: Int, obstaclePositions: List<Int>, targetPosition: Int): String {

    // Check if there is any obstacle at the target position
    if (obstaclePositions.contains(targetPosition)) {
        // Add code here to handle the case when there is an obstacle at the target position
        return "stay"
    }

    // Check if the target position is to the left of the athlete's current position
    if (targetPosition < athletePosition) {
        // Add code here to handle the case when the target position is to the left
    }

    // Add code here to handle the case when the target position is to the right

    return "right"
}
/**
 * A code completion exercise for an athlete navigating obstacles on a number line representation.
 *
 * The athlete is positioned on a number line and needs to reach a target position while avoiding obstacles.
 * We need to determine whether the athlete should move left, right, or stay in the same position based on the
 * positions of the obstacles. Complete the code to solve the exercise.
 *
 * @param athletePosition The current position of the athlete on the number line.
 * @param obstaclePositions The position of the obstacles on the number line (can be a list of positions).
 * @param targetPosition The target position the athlete wants to reach on the number line.
 * @return The direction the athlete should take: 'left', 'right', or 'stay'.
 */
fun name(athletePosition: Int, obstaclePositions: List<Int>, targetPosition: Int): String {
/**
 * A code completion exercise for an athlete navigating obstacles on a number line representation.
 *
 * The athlete is positioned on a number line and needs to reach a target position while avoiding obstacles.
 * We need to determine whether the athlete should move left, right, or stay in the same position based on the
 * positions of the obstacles. Complete the code to solve the exercise.
 *
 * @param athletePosition The current position of the athlete on the number line.
 * @param obstaclePositions The position of the obstacles on the number line (can be a list of positions).
 * @param targetPosition The target position the athlete wants to reach on the number line.
 * @return The direction the athlete should take: 'left', 'right', or 'stay'.
 */
fun name(athletePosition: Int, obstaclePositions: List<Int>, targetPosition: Int): String {

    // Check if there is any obstacle at the target position
    if (obstaclePositions.contains(targetPosition)) {
        // Add code here to handle the case when there is an obstacle at the target position
        return "stay"
    }

    // Check if the target position is to the left of the athlete's current position
    if (targetPosition < athletePosition) {
        // Add code here to handle the case when the target position is to the left
    }

    // Add code here to handle the case when the target position is to the right

    return "right"
}