input: Write a function to check if a list is monotonic.
  assert check_monotonic([1, 2, 3, 4, 5]) == True
  assert check_monotonic([5, 4, 3, 2, 1]) == True
  assert check_monotonic([1, 3, 2, 4, 5]) == False
  assert check_monotonic([10, 10, 10]) == True
output: def check_monotonic(lst):
      if all(lst[i] <= lst[i + 1] for i in range(len(lst) - 1)) or all(lst[i] >= lst[i + 1] for i in range(len(lst) - 1)):
          return True
      return False