




from __future__ import annotations




def 		lowerCAmelCase_   (	lowerCamelCase   ):
				__magic_name__	:	List[str]								=len(lowerCamelCase   )
				# We need to create solution object to save path.
				__magic_name__	:	List[Any]								=[[0 for _ in range(lowerCamelCase   )] for _ in range(lowerCamelCase   )]
				__magic_name__	:	Tuple								=run_maze(lowerCamelCase	,     0	,     0	,     lowerCamelCase   )
				if solved:
								print("""\n""".join(str(lowerCamelCase   ) for row in solutions   )   )
				else:
								print("""No solution exists!"""   )
				return solved




def 		lowerCAmelCase_   (	lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase	,     lowerCamelCase   ):
				__magic_name__	:	Tuple								=len(lowerCamelCase   )
				# Final check point.
				if i == j == (size - 1):
								__magic_name__	:	Tuple								=1
								return True

				__magic_name__	:	Optional[int]								=(not i < 0) and (not j < 0)  # Check lower bounds
				__magic_name__	:	List[str]								=(i < size) and (j < size)  # Check upper bounds

				if lower_flag and upper_flag:
								# check for already visited and block points.
								__magic_name__	:	Any								=(not solutions[i][j]) and (not maze[i][j])
								if block_flag:
												# check visited
												__magic_name__	:	Dict								=1

												# check for directions
												if (
												    run_maze(lowerCamelCase	,     i + 1	,     lowerCamelCase	,     lowerCamelCase   )
												    or run_maze(lowerCamelCase	,     lowerCamelCase	,     j + 1	,     lowerCamelCase   )
												    or run_maze(lowerCamelCase	,     i - 1	,     lowerCamelCase	,     lowerCamelCase   )
												    or run_maze(lowerCamelCase	,     lowerCamelCase	,     j - 1	,     lowerCamelCase   )
												):
																return True

												__magic_name__	:	Union[str, Any]								=0
												return False
				return False


if __name__ == "__main__":
							import doctest

							doctest.testmod()










from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCAmelCase_		:				Dict									=     {"configuration_wavlm": ["WAVLM_PRETRAINED_CONFIG_ARCHIVE_MAP", "WavLMConfig"]}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCAmelCase_		:				Optional[int]									=     [
							    "WAVLM_PRETRAINED_MODEL_ARCHIVE_LIST",
							    "WavLMForAudioFrameClassification",
							    "WavLMForCTC",
							    "WavLMForSequenceClassification",
							    "WavLMForXVector",
							    "WavLMModel",
							    "WavLMPreTrainedModel",
							]

if TYPE_CHECKING:
							from .configuration_wavlm import WAVLM_PRETRAINED_CONFIG_ARCHIVE_MAP, WavLMConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_wavlm import (
														    WAVLM_PRETRAINED_MODEL_ARCHIVE_LIST,
														    WavLMForAudioFrameClassification,
														    WavLMForCTC,
														    WavLMForSequenceClassification,
														    WavLMForXVector,
														    WavLMModel,
														    WavLMPreTrainedModel,
														)

else:
							import sys

							UpperCAmelCase_		:				Union[str, Any]									=     _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




