





from ..utils import DummyObject, requires_backends




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Union[str, Any],				*lowerCAmelCase__	:					Optional[int],				**lowerCAmelCase__	:					Dict							)			->   Tuple:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					Dict,				**lowerCAmelCase__	:					Dict							)			->   int:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Dict,				*lowerCAmelCase__	:					Tuple,				**lowerCAmelCase__	:					Optional[Any]							)			->   Optional[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					Optional[int],				**lowerCAmelCase__	:					Optional[int]							)			->   Dict:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					int,				*lowerCAmelCase__	:					Union[str, Any],				**lowerCAmelCase__	:					int							)			->   Optional[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					List[str],				*lowerCAmelCase__	:					int,				**lowerCAmelCase__	:					List[Any]							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					int,				**lowerCAmelCase__	:					Optional[int]							)			->   Tuple:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					int,				*lowerCAmelCase__	:					Optional[int],				**lowerCAmelCase__	:					Tuple							)			->   Tuple:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Union[str, Any],				*lowerCAmelCase__	:					List[Any],				**lowerCAmelCase__	:					Any							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					str,				*lowerCAmelCase__	:					List[str],				**lowerCAmelCase__	:					Optional[Any]							)			->   str:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[Any],				*lowerCAmelCase__	:					Any,				**lowerCAmelCase__	:					Dict							)			->   Tuple:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[int],				*lowerCAmelCase__	:					Optional[Any],				**lowerCAmelCase__	:					Optional[int]							)			->   Dict:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Union[str, Any],				*lowerCAmelCase__	:					str,				**lowerCAmelCase__	:					List[Any]							)			->   List[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					str,				*lowerCAmelCase__	:					int,				**lowerCAmelCase__	:					Union[str, Any]							)			->   List[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					List[Any],				**lowerCAmelCase__	:					Tuple							)			->   str:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					Dict,				**lowerCAmelCase__	:					Optional[Any]							)			->   Tuple:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					int,				**lowerCAmelCase__	:					Dict							)			->   List[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					List[Any],				**lowerCAmelCase__	:					int							)			->   int:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Tuple,				*lowerCAmelCase__	:					Dict,				**lowerCAmelCase__	:					Union[str, Any]							)			->   int:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[Any],				*lowerCAmelCase__	:					List[str],				**lowerCAmelCase__	:					Union[str, Any]							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Dict,				*lowerCAmelCase__	:					Optional[Any],				**lowerCAmelCase__	:					str							)			->   List[str]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[Any],				*lowerCAmelCase__	:					Union[str, Any],				**lowerCAmelCase__	:					int							)			->   Tuple:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[Any],				*lowerCAmelCase__	:					Any,				**lowerCAmelCase__	:					Dict							)			->   Dict:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					List[str],				*lowerCAmelCase__	:					List[str],				**lowerCAmelCase__	:					Tuple							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					List[Any],				**lowerCAmelCase__	:					List[Any]							)			->   List[str]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[int],				*lowerCAmelCase__	:					Tuple,				**lowerCAmelCase__	:					Optional[Any]							)			->   List[str]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[int],				*lowerCAmelCase__	:					int,				**lowerCAmelCase__	:					Tuple							)			->   Dict:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					Tuple,				**lowerCAmelCase__	:					Dict							)			->   str:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Union[str, Any],				*lowerCAmelCase__	:					Optional[Any],				**lowerCAmelCase__	:					Optional[int]							)			->   Union[str, Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					Any,				**lowerCAmelCase__	:					Dict							)			->   Tuple:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					List[str],				*lowerCAmelCase__	:					List[Any],				**lowerCAmelCase__	:					Union[str, Any]							)			->   List[str]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[Any],				*lowerCAmelCase__	:					Union[str, Any],				**lowerCAmelCase__	:					Any							)			->   List[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[int],				*lowerCAmelCase__	:					Tuple,				**lowerCAmelCase__	:					int							)			->   Optional[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Union[str, Any],				*lowerCAmelCase__	:					List[str],				**lowerCAmelCase__	:					Tuple							)			->   Tuple:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					str,				*lowerCAmelCase__	:					Dict,				**lowerCAmelCase__	:					Union[str, Any]							)			->   str:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					str,				*lowerCAmelCase__	:					Optional[Any],				**lowerCAmelCase__	:					Dict							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Dict,				*lowerCAmelCase__	:					str,				**lowerCAmelCase__	:					List[Any]							)			->   Dict:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					List[str],				*lowerCAmelCase__	:					Tuple,				**lowerCAmelCase__	:					Union[str, Any]							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Dict,				*lowerCAmelCase__	:					List[Any],				**lowerCAmelCase__	:					Optional[Any]							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[int],				*lowerCAmelCase__	:					Union[str, Any],				**lowerCAmelCase__	:					Any							)			->   int:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					int,				*lowerCAmelCase__	:					Any,				**lowerCAmelCase__	:					str							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[Any],				*lowerCAmelCase__	:					Optional[int],				**lowerCAmelCase__	:					str							)			->   Optional[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[int],				*lowerCAmelCase__	:					Tuple,				**lowerCAmelCase__	:					Optional[Any]							)			->   Tuple:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Dict,				*lowerCAmelCase__	:					Optional[int],				**lowerCAmelCase__	:					Optional[int]							)			->   str:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					str,				*lowerCAmelCase__	:					Dict,				**lowerCAmelCase__	:					Dict							)			->   str:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					List[str],				*lowerCAmelCase__	:					Union[str, Any],				**lowerCAmelCase__	:					Union[str, Any]							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[Any],				*lowerCAmelCase__	:					Optional[int],				**lowerCAmelCase__	:					Optional[int]							)			->   List[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Dict,				*lowerCAmelCase__	:					Dict,				**lowerCAmelCase__	:					Union[str, Any]							)			->   int:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Dict,				*lowerCAmelCase__	:					List[Any],				**lowerCAmelCase__	:					Any							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					str,				*lowerCAmelCase__	:					Tuple,				**lowerCAmelCase__	:					Dict							)			->   Union[str, Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Any,				*lowerCAmelCase__	:					Optional[Any],				**lowerCAmelCase__	:					List[str]							)			->   Any:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					List[str],				*lowerCAmelCase__	:					str,				**lowerCAmelCase__	:					Optional[Any]							)			->   List[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					int,				*lowerCAmelCase__	:					List[str],				**lowerCAmelCase__	:					Optional[int]							)			->   List[str]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					List[Any],				*lowerCAmelCase__	:					Dict,				**lowerCAmelCase__	:					Dict							)			->   Optional[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					int,				*lowerCAmelCase__	:					Tuple,				**lowerCAmelCase__	:					int							)			->   int:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					List[Any],				*lowerCAmelCase__	:					Tuple,				**lowerCAmelCase__	:					Optional[int]							)			->   int:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Optional[Any],				*lowerCAmelCase__	:					List[str],				**lowerCAmelCase__	:					List[str]							)			->   Union[str, Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)




class 				_a		(   metaclass=lowerCamelCase_       ):
				UpperCamelCase			=					["""tokenizers"""]






				def __init__(				self	:					Union[str, Any],				*lowerCAmelCase__	:					str,				**lowerCAmelCase__	:					Union[str, Any]							)			->   List[Any]:




										'''simple docstring'''



										requires_backends(self,				['''tokenizers''']							)










"""simple docstring"""




def  a_       (							_lowercase ,		_lowercase ,		_lowercase ,		_lowercase     ):
						return len_board * len_board_column * row + column





def  a_       (							_lowercase ,		_lowercase ,		_lowercase ,		_lowercase ,		_lowercase ,		_lowercase ,		):

						if board[row][column] != word[word_index]:
												return False

						if word_index == len(_lowercase     ) - 1:
												return True

						_UpperCamelCase    :      Union[str, Any]						     =					[(0, 1), (0, -1), (-1, 0), (1, 0)]
						_UpperCamelCase    :      List[str]						     =					len(_lowercase     )
						_UpperCamelCase    :      Optional[Any]						     =					len(board[0]     )
						for direction in traverts_directions:
												_UpperCamelCase    :      Union[str, Any]						     =					row + direction[0]
												_UpperCamelCase    :      List[Any]						     =					column + direction[1]
												if not (0 <= next_i < len_board and 0 <= next_j < len_board_column):
																		continue

												_UpperCamelCase    :      Optional[Any]						     =					get_point_key(_lowercase ,		_lowercase ,		_lowercase ,		_lowercase     )
												if key in visited_points_set:
																		continue

												visited_points_set.add(_lowercase     )
												if exits_word(_lowercase ,		_lowercase ,		_lowercase ,		_lowercase ,		word_index + 1 ,		_lowercase     ):
																		return True

												visited_points_set.remove(_lowercase     )

						return False





def  a_       (							_lowercase ,		_lowercase     ):
						_UpperCamelCase    :      Optional[Any]						     =					(
						    '''The board should be a non empty matrix of single chars strings.'''
						)

						_UpperCamelCase    :      int						     =					len(_lowercase     )
						if not isinstance(_lowercase ,		_lowercase     ) or len(_lowercase     ) == 0:
												raise ValueError(_lowercase     )

						for row in board:
												if not isinstance(_lowercase ,		_lowercase     ) or len(_lowercase     ) == 0:
																		raise ValueError(_lowercase     )

												for item in row:
																		if not isinstance(_lowercase ,		_lowercase     ) or len(_lowercase     ) != 1:
																								raise ValueError(_lowercase     )

    # Validate word
						if not isinstance(_lowercase ,		_lowercase     ) or len(_lowercase     ) == 0:
												raise ValueError(
												    '''The word parameter should be a string of length greater than 0.'''     )

						_UpperCamelCase    :      List[str]						     =					len(board[0]     )
						for i in range(_lowercase     ):
												for j in range(_lowercase     ):
																		if exits_word(
																		    _lowercase ,		_lowercase ,		_lowercase ,		_lowercase ,		0 ,		{get_point_key(_lowercase ,		_lowercase ,		_lowercase ,		_lowercase     )}     ):
																								return True

						return False


if __name__ == "__main__":
						import doctest

						doctest.testmod()



