






"""simple docstring"""


from __future__ import annotations

from collections.abc import Iterable, Iterator
from typing import Any, Generic, TypeVar

_UpperCamelCase   :						Tuple     						= TypeVar("""T""", bound=bool)






class __a   (   Generic[T]				):



  def __init__(self  :		Optional[int]				,			lowercase_  :		T   )		->							None:
   __A	:       T       =	value
   __A	:       SkewNode[T] | None       =	None
   __A	:       SkewNode[T] | None       =	None



  @property
  def 						A_				(self  :		Tuple   )		->							T:
   return self._value



  @staticmethod
  def 						A_				(lowercase_  :		SkewNode[T] | None				,			lowercase_  :		SkewNode[T] | None   )		->							SkewNode[T] | None:
   if not roota:
    return roota

   if not roota:
    return roota

   if roota.value > roota.value:
    __A    ,					__A	:       Union[str, Any]       =	roota, roota

   __A	:       Dict       =	roota
   __A	:       List[str]       =	roota.right
   __A	:       List[str]       =	roota.left
   __A	:       Dict       =	SkewNode.merge(lowercase_				,			lowercase_   )

   return result






class __a   (   Generic[T]				):



  def __init__(self  :		Union[str, Any]				,			lowercase_  :		Iterable[T] | None = ()   )		->							None:
   __A	:       SkewNode[T] | None       =	None
   if data:
    for item in data:
     self.insert(lowercase_   )



  def __bool__(self  :		Union[str, Any]   )		->							bool:
   return self._root is not None



  def __iter__(self  :		int   )		->							Iterator[T]:
   __A	:       list[Any]       =	[]
   while self:
    result.append(self.pop()   )

   # Pushing items back to the heap not to clear it.
   for item in result:
    self.insert(lowercase_   )

   return iter(lowercase_   )



  def 						A_				(self  :		Union[str, Any]				,			lowercase_  :		T   )		->							None:
   __A	:       Tuple       =	SkewNode.merge(self._root				,			SkewNode(lowercase_   )   )



  def 						A_				(self  :		Optional[int]   )		->							T | None:
   __A	:       List[Any]       =	self.top()
   __A	:       Optional[Any]       =	(
       SkewNode.merge(self._root.left				,			self._root.right   ) if self._root else None
   )

   return result



  def 						A_				(self  :		Tuple   )		->							T:
   if not self._root:
    raise IndexError('Can\'t get top element for the empty heap.'   )
   return self._root.value



  def 						A_				(self  :		str   )		->							None:
   __A	:       Any       =	None


if __name__ == "__main__":
   import doctest

   doctest.testmod()













"""simple docstring"""


def 				a (     UpperCamelCase_							:				list     ,	UpperCamelCase_							:				int		)  ->		int:
 for index, item in enumerate(UpperCamelCase_		):
  if item == target:
   return index
 return -1




def 				a (     UpperCamelCase_							:				list     ,	UpperCamelCase_							:				int     ,	UpperCamelCase_							:				int     ,	UpperCamelCase_							:				int		)  ->		int:
 if not (0 <= high < len(UpperCamelCase_		) and 0 <= low < len(UpperCamelCase_		)):
  raise Exception('Invalid upper or lower bound!'		)
 if high < low:
  return -1
 if sequence[low] == target:
  return low
 if sequence[high] == target:
  return high
 return rec_linear_search(UpperCamelCase_     ,	low + 1     ,	high - 1     ,	UpperCamelCase_		)


if __name__ == "__main__":
   _UpperCamelCase   :						Any     						= input("""Enter numbers separated by comma:\n""").strip()
   _UpperCamelCase   :						Optional[Any]     						= [int(item.strip()) for item in user_input.split(""",""")]

   _UpperCamelCase   :						List[str]     						= int(input("""Enter a single number to be found in the list:\n""").strip())
   _UpperCamelCase   :						List[Any]     						= linear_search(sequence, target)
   if result != -1:
      print(f'''linear_search({sequence}, {target}) = {result}''')
   else:
      print(f'''{target} was not found in {sequence}''')





