



from __future__ import annotations



def    snake_case_				(    _SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE   ):
	__lowercase       ,    __lowercase		       =			position
	__lowercase		       =			[
	    (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),
	]
	__lowercase		       =			[]

	for position in positions:
		__lowercase       ,    __lowercase		       =			position
		if 0 <= y_test < n and 0 <= x_test < n:
			permissible_positions.append(_SCREAMING_SNAKE_CASE   )

	return permissible_positions



def    snake_case_				(    _SCREAMING_SNAKE_CASE   ):
	return not any(elem == 0 for row in board for elem in row   )



def    snake_case_				(    _SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE   ):

	if is_complete(_SCREAMING_SNAKE_CASE   ):
		return True

	for position in get_valid_pos(_SCREAMING_SNAKE_CASE  ,	len(_SCREAMING_SNAKE_CASE   )   ):
		__lowercase       ,    __lowercase		       =			position

		if board[y][x] == 0:
			__lowercase		       =			curr + 1
			if open_knight_tour_helper(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	curr + 1   ):
				return True
			__lowercase		       =			0

	return False



def    snake_case_				(    _SCREAMING_SNAKE_CASE   ):
	__lowercase		       =			[[0 for i in range(_SCREAMING_SNAKE_CASE   )] for j in range(_SCREAMING_SNAKE_CASE   )]

	for i in range(_SCREAMING_SNAKE_CASE   ):
		for j in range(_SCREAMING_SNAKE_CASE   ):
			__lowercase		       =			1
			if open_knight_tour_helper(_SCREAMING_SNAKE_CASE  ,	(i, j)  ,	1   ):
				return board
			__lowercase		       =			0

	__lowercase		       =			F"""Open Kight Tour cannot be performed on a board of size {n}"""
	raise ValueError(_SCREAMING_SNAKE_CASE   )


if __name__ == "__main__":
	import doctest

	doctest.testmod()








from __future__ import annotations

import bisect



def    snake_case_				(    _SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE = 0  ,	_SCREAMING_SNAKE_CASE = -1   ):
	if hi < 0:
		__lowercase		       =			len(_SCREAMING_SNAKE_CASE   )

	while lo < hi:
		__lowercase		       =			lo + (hi - lo) // 2
		if sorted_collection[mid] < item:
			__lowercase		       =			mid + 1
		else:
			__lowercase		       =			mid

	return lo



def    snake_case_				(    _SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE = 0  ,	_SCREAMING_SNAKE_CASE = -1   ):
	if hi < 0:
		__lowercase		       =			len(_SCREAMING_SNAKE_CASE   )

	while lo < hi:
		__lowercase		       =			lo + (hi - lo) // 2
		if sorted_collection[mid] <= item:
			__lowercase		       =			mid + 1
		else:
			__lowercase		       =			mid

	return lo



def    snake_case_				(    _SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE = 0  ,	_SCREAMING_SNAKE_CASE = -1   ):
	sorted_collection.insert(bisect_left(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE   )  ,	_SCREAMING_SNAKE_CASE   )



def    snake_case_				(    _SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE = 0  ,	_SCREAMING_SNAKE_CASE = -1   ):
	sorted_collection.insert(bisect_right(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE   )  ,	_SCREAMING_SNAKE_CASE   )



def    snake_case_				(    _SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE   ):
	__lowercase		       =			0
	__lowercase		       =			len(_SCREAMING_SNAKE_CASE   ) - 1

	while left <= right:
		__lowercase		       =			left + (right - left) // 2
		__lowercase		       =			sorted_collection[midpoint]
		if current_item == item:
			return midpoint
		elif item < current_item:
			__lowercase		       =			midpoint - 1
		else:
			__lowercase		       =			midpoint + 1
	return None



def    snake_case_				(    _SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE   ):
	__lowercase		       =			bisect.bisect_left(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE   )
	if index != len(_SCREAMING_SNAKE_CASE   ) and sorted_collection[index] == item:
		return index
	return None



def    snake_case_				(    _SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE   ):
	if right < left:
		return None

	__lowercase		       =			left + (right - left) // 2

	if sorted_collection[midpoint] == item:
		return midpoint
	elif sorted_collection[midpoint] > item:
		return binary_search_by_recursion(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	midpoint - 1   )
	else:
		return binary_search_by_recursion(_SCREAMING_SNAKE_CASE  ,	_SCREAMING_SNAKE_CASE  ,	midpoint + 1  ,	_SCREAMING_SNAKE_CASE   )


if __name__ == "__main__":
	snake_case__					:     Optional[Any]    		=   input("""Enter numbers separated by comma:\n""").strip()
	snake_case__					:     Any    		=   sorted(int(item) for item in user_input.split(""","""))
	snake_case__					:     Any    		=   int(input("""Enter a single number to be found in the list:\n"""))
	snake_case__					:     List[Any]    		=   binary_search(collection, target)
	if result is None:
		print(F'''{target} was not found in {collection}.''')
	else:
		print(F'''{target} was found at position {result} in {collection}.''')



