input: from typing import List
  
  def add_matrices(matrix1: List[List[int]], matrix2: List[List[int]]) -> List[List[int]]:
      """ Adds two matrices and returns the result.
      >>> add_matrices([[1, 2], [3, 4]], [[5, 6], [7, 8]])
      [[6, 8], [10, 12]]
      >>> add_matrices([[1, 2], [3, 4]], [[1, 2, 3], [4, 5, 6]])
      'Matrices not compatible'
      """
output:     if len(matrix1) != len(matrix2) or len(matrix1[0]) != len(matrix2[0]):
          return 'Matrices not compatible'
      
      result = []
      for i in range(len(matrix1)):
          row = []
          for j in range(len(matrix1[0])):
              row.append(matrix1[i][j] + matrix2[i][j])
          result.append(row)
      
      return result