





from __future__ import annotations






def 		lowerCAmelCase  (	UpperCamelCase__   :   tuple[int, int]       ,			UpperCamelCase__   :   int					)      ->    list[tuple[int, int]]:

						"""simple docstring"""





						__SCREAMING_SNAKE_CASE       ,__SCREAMING_SNAKE_CASE:				Dict           =   position
						__SCREAMING_SNAKE_CASE:				Optional[int]           =   [
						    (y + 1, x + 2),
						    (y - 1, x + 2),
						    (y + 1, x - 2),
						    (y - 1, x - 2),
						    (y + 2, x + 1),
						    (y + 2, x - 1),
						    (y - 2, x + 1),
						    (y - 2, x - 1),
						]
						__SCREAMING_SNAKE_CASE:				str           =   []

						for position in positions:
												__SCREAMING_SNAKE_CASE       ,__SCREAMING_SNAKE_CASE:				List[str]           =   position
												if 0 <= y_test < n and 0 <= x_test < n:
																		permissible_positions.append(UpperCamelCase__					)

						return permissible_positions






def 		lowerCAmelCase  (	UpperCamelCase__   :   list[list[int]]					)      ->    bool:

						"""simple docstring"""





						return not any(elem == 0 for row in board for elem in row					)






def 		lowerCAmelCase  (	UpperCamelCase__   :   list[list[int]]       ,			UpperCamelCase__   :   tuple[int, int]       ,			UpperCamelCase__   :   int					)      ->    bool:

						"""simple docstring"""





						if is_complete(UpperCamelCase__					):
												return True

						for position in get_valid_pos(UpperCamelCase__       ,			len(UpperCamelCase__					)					):
												__SCREAMING_SNAKE_CASE       ,__SCREAMING_SNAKE_CASE:				List[Any]           =   position

												if board[y][x] == 0:
																		__SCREAMING_SNAKE_CASE:				int           =   curr + 1
																		if open_knight_tour_helper(UpperCamelCase__       ,			UpperCamelCase__       ,			curr + 1					):
																								return True
																		__SCREAMING_SNAKE_CASE:				Optional[Any]           =   0

						return False






def 		lowerCAmelCase  (	UpperCamelCase__   :   int					)      ->    list[list[int]]:

						"""simple docstring"""





						__SCREAMING_SNAKE_CASE:				List[str]           =   [[0 for i in range(UpperCamelCase__					)] for j in range(UpperCamelCase__					)]

						for i in range(UpperCamelCase__					):
												for j in range(UpperCamelCase__					):
																		__SCREAMING_SNAKE_CASE:				Any           =   1
																		if open_knight_tour_helper(UpperCamelCase__       ,			(i, j)       ,			1					):
																								return board
																		__SCREAMING_SNAKE_CASE:				int           =   0

						__SCREAMING_SNAKE_CASE:				Any           =   F"""Open Kight Tour cannot be performed on a board of size {n}"""
						raise ValueError(UpperCamelCase__					)


if __name__ == "__main__":
							import doctest

							doctest.testmod()










import re






def 		lowerCAmelCase  (	UpperCamelCase__   :   str					)      ->    bool:

						"""simple docstring"""





						__SCREAMING_SNAKE_CASE:				Optional[int]           =   re.compile(
						    R'''^(?:0|94|\+94|0{2}94)''' R'''7(0|1|2|4|5|6|7|8)''' R'''(-| |)''' R'''\d{7}$'''					)

						return bool(re.search(UpperCamelCase__       ,			UpperCamelCase__					)					)


if __name__ == "__main__":
							lowerCAmelCase							:       str					 =	"""0094702343221"""

							print(is_sri_lankan_phone_number(phone))



