
    Write a function to determine if a sequence of transaction amounts follows a strictly increasing or decreasing pattern, which could indicate potential automated fraud. The function should analyze the transaction history array and return true if all amounts are either consistently increasing or consistently decreasing, and false otherwise.
    

    
def is_Monotonic(A):
    """
    Write a function to determine if a sequence of transaction amounts follows a strictly increasing or decreasing pattern, which could indicate potential automated fraud. The function should analyze the transaction history array and return true if all amounts are either consistently increasing or consistently decreasing, and false otherwise.
    

    """
def is_Monotonic(A):
    """
    Write a function to determine if a sequence of transaction amounts follows a strictly increasing or decreasing pattern, which could indicate potential automated fraud. The function should analyze the transaction history array and return true if all amounts are either consistently increasing or consistently decreasing, and false otherwise.
    

    """
    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)))