



def   _A       (    SCREAMING_SNAKE_CASE__  :     Union[str, Any]					,  SCREAMING_SNAKE_CASE__  :     str	):
    UpperCamelCase	:Optional[Any]     							=       len(__UpperCamelCase	)
    # Create a stack and push index of fist element to it
    UpperCamelCase	:Tuple     							=       []
    st.append(0	)

    # Span value of first element is always 1
    UpperCamelCase	:Tuple     							=       1

    # Calculate span values for rest of the elements
    for i in range(1					,  __UpperCamelCase	):
        # Pop elements from stack while stack is not
        # empty and top of stack is smaller than price[i]
        while len(__UpperCamelCase	) > 0 and price[st[0]] <= price[i]:
            st.pop()

        # If stack becomes empty, then price[i] is greater
        # than all elements on left of it, i.e. price[0],
        # price[1], ..price[i-1]. Else the price[i]  is
        # greater than elements after top of stack
        UpperCamelCase	:Optional[Any]     							=       i + 1 if len(__UpperCamelCase	) <= 0 else (i - st[0])

        # Push this element to stack
        st.append(__UpperCamelCase	)


def   _A       (    SCREAMING_SNAKE_CASE__  :     Any					,  SCREAMING_SNAKE_CASE__  :     Dict	):
    for i in range(0					,  __UpperCamelCase	):
        print(arr[i]					,  end=''' '''	)


# Driver program to test above function
__snake_case							 =  [10, 4, 5, 90, 1_20, 80]
__snake_case							 =  [0 for i in range(len(price) + 1)]

# Fill the span values in array S[]
calculation_span(price, S)



print_array(S, len(price))













def   _A       (    SCREAMING_SNAKE_CASE__  :     int = 998001	):

    # fetches the next number
    for number in range(n - 1					,  9999					,  -1	):
        UpperCamelCase	:Union[str, Any]     							=       str(SCREAMING_SNAKE_CASE__	)

        # checks whether 'str_number' is a palindrome.
        if str_number == str_number[::-1]:
            UpperCamelCase	:Dict     							=       999

            # if 'number' is a product of two 3-digit numbers
            # then number is the answer otherwise fetch next number.
            while divisor != 99:
                if (number % divisor == 0) and (len(str(number // divisor	)	) == 3.0):
                    return number
                divisor -= 1
    raise ValueError('''That number is larger than our acceptable range.'''	)


if __name__ == "__main__":
 print(f'''{solution() = }''')





