input: from typing import List
  
  def satisfies_conditions(grid: List[List[int]]) -> bool:
      """
      You are given a 2D matrix grid of size m x n. You need to check if each cell grid[i][j] is:
  
      Equal to the cell below it, i.e. grid[i][j] == grid[i + 1][j] (if it exists).
      Different from the cell to its right, i.e. grid[i][j] != grid[i][j + 1] (if it exists).
      Return true if all the cells satisfy these conditions, otherwise, return false.
  
      Examples:
      >>> grid = [[1,0,2],[1,0,2]]
      true
      >>> grid = [[1,1,1],[0,0,0]]
      false
      >>> grid = [[1],[2],[3]]
      false
  
      Constraints:
      1 <= n, m <= 10
      0 <= grid[i][j] <= 9
      """
  
output:     for i in range(len(grid) - 1):
          for j in range(len(grid[i])):
              if grid[i][j] != grid[i + 1][j]:
                  return False
              if j < len(grid[i]) - 1 and grid[i][j] == grid[i][j + 1]:
                  return False
      return True