
    Given historical maintenance performance scores for transit vehicles, determine the optimal maintenance pattern by finding the highest possible product of scores that form an increasing sequence over time. The increasing sequence represents a series of successful maintenance interventions that progressively improved vehicle reliability, and the product of these scores quantifies the overall effectiveness of the maintenance strategy.
    

    
def max_product(arr):
    """
    Given historical maintenance performance scores for transit vehicles, determine the optimal maintenance pattern by finding the highest possible product of scores that form an increasing sequence over time. The increasing sequence represents a series of successful maintenance interventions that progressively improved vehicle reliability, and the product of these scores quantifies the overall effectiveness of the maintenance strategy.
    

    """
def max_product(arr):
    """
    Given historical maintenance performance scores for transit vehicles, determine the optimal maintenance pattern by finding the highest possible product of scores that form an increasing sequence over time. The increasing sequence represents a series of successful maintenance interventions that progressively improved vehicle reliability, and the product of these scores quantifies the overall effectiveness of the maintenance strategy.
    

    """
    n = len(arr)
    mpis = arr[:]
    for i in range(n):
        current_prod = arr[i]
        j = i + 1
        while j < n:
            if arr[j - 1] > arr[j]:
                break
            current_prod *= arr[j]
            if current_prod > mpis[j]:
                mpis[j] = current_prod
            j = j + 1
    return max(mpis)