
    Write a function to determine if a sequence of patient risk assessment scores follows a consistently improving or worsening trend over time. The function should analyze the sequential risk scores and determine if they are either strictly increasing (indicating steady deterioration) or strictly decreasing (indicating consistent improvement), with equal consecutive values being acceptable within the trend.
    

    
def is_Monotonic(A):
    """
    Write a function to determine if a sequence of patient risk assessment scores follows a consistently improving or worsening trend over time. The function should analyze the sequential risk scores and determine if they are either strictly increasing (indicating steady deterioration) or strictly decreasing (indicating consistent improvement), with equal consecutive values being acceptable within the trend.
    

    """
def is_Monotonic(A):
    """
    Write a function to determine if a sequence of patient risk assessment scores follows a consistently improving or worsening trend over time. The function should analyze the sequential risk scores and determine if they are either strictly increasing (indicating steady deterioration) or strictly decreasing (indicating consistent improvement), with equal consecutive values being acceptable within the trend.
    

    """
    return all((A[i] <= A[i + 1] for i in range(len(A) - 1))) or all((A[i] >= A[i + 1] for i in range(len(A) - 1)))