code: def dfs(self, arr, i, j, word):
      if not word:  # Base case: reached the end of the word string
          self.found = True
          return self.found
  
      temp = arr[i][
          j
      ]  # Store the arr value temporarily for later reassignment
      arr[i][
          j
      ] = "#"  # Mark the cell visited for the current set of (i,j)
  
      for I, J in (
          (i + 1, j),
          (i - 1, j),
          (i, j + 1),
          (i, j - 1),
      ):  # Scan left,right,below & above (i,j) for the next letter
          if (
              0 <= I < len(arr)
              and 0 <= J < len(arr[0])
              and arr[I][J] == word[0]
          ):
              self.dfs(
                  arr, I, J, word[1:]
              )  # If the next letter is found, go for the further next until base case
  
      arr[i][
          j
      ] = temp  # In case, word is not found for (i,j) we need the board in original form to check for next set of (i,j) from exist function
      return self.found
  
label_desc: Use image node_id 3 for calling the Solution obj's underlying member method code with example usage: obj.dfs(arr, i, j, word) and returns: self, self