
'''simple docstring'''





class        UpperCAmelCase_       :

 '''simple docstring'''






 class        UpperCAmelCase_       :

  '''simple docstring'''
  lowercase_				:						Any				=       "_prev", "_data", "_next"







  def __init__(				self		:     str ,							snake_case__		:     List[str] ,							snake_case__		:     Any ,							snake_case__		:     Dict   ):



    '''simple docstring'''




    UpperCAmelCase__			:				Union[str, Any]												=       link_p
    UpperCAmelCase__			:				Union[str, Any]												=       element
    UpperCAmelCase__			:				Any												=       link_n







  def        UpperCamelCase     (				self		:     Union[str, Any]   ):



    '''simple docstring'''




    return (
        F""" Prev -> {self._prev is not None}, Next -> {self._next is not None}"""
    )







 def __init__(				self		:     str   ):



   '''simple docstring'''




   UpperCAmelCase__			:				int												=       self._Node(snake_case__ ,							snake_case__ ,							snake_case__   )
   UpperCAmelCase__			:				Union[str, Any]												=       self._Node(snake_case__ ,							snake_case__ ,							snake_case__   )
   UpperCAmelCase__			:				int												=       self._trailer
   UpperCAmelCase__			:				int												=       self._header
   UpperCAmelCase__			:				int												=       0







 def __len__(				self		:     Optional[int]   ):



   '''simple docstring'''




   return self._size







 def        UpperCamelCase     (				self		:     Dict   ):



   '''simple docstring'''




   return self.__len__() == 0







 def        UpperCamelCase     (				self		:     Union[str, Any] ,							snake_case__		:     Tuple ,							snake_case__		:     Union[str, Any] ,							snake_case__		:     Optional[int]   ):



   '''simple docstring'''




   UpperCAmelCase__			:				Dict												=       self._Node(snake_case__ ,							snake_case__ ,							snake_case__   )
   UpperCAmelCase__			:				int												=       new_node
   UpperCAmelCase__			:				Tuple												=       new_node
   self._size += 1
   return self







 def        UpperCamelCase     (				self		:     List[str] ,							snake_case__		:     Dict   ):



   '''simple docstring'''




   UpperCAmelCase__			:				Optional[Any]												=       node._prev
   UpperCAmelCase__			:				Tuple												=       node._next

   UpperCAmelCase__			:				List[str]												=       successor
   UpperCAmelCase__			:				Any												=       predecessor
   self._size -= 1
   UpperCAmelCase__			:				Any												=       node._data
   UpperCAmelCase__			:				Dict												=       None
   del node
   return temp






class        UpperCAmelCase_       (						_DoublyLinkedBase							):

 '''simple docstring'''







 def        UpperCamelCase     (				self		:     Tuple   ):



   '''simple docstring'''




   if self.is_empty():
     raise Exception("List is empty"   )
   return self._header._next._data







 def        UpperCamelCase     (				self		:     int   ):



   '''simple docstring'''




   if self.is_empty():
     raise Exception("List is empty"   )
   return self._trailer._prev._data







 def        UpperCamelCase     (				self		:     List[str] ,							snake_case__		:     str   ):



   '''simple docstring'''




   return self._insert(self._header ,							snake_case__ ,							self._header._next   )







 def        UpperCamelCase     (				self		:     List[Any] ,							snake_case__		:     Union[str, Any]   ):



   '''simple docstring'''




   return self._insert(self._trailer._prev ,							snake_case__ ,							self._trailer   )







 def        UpperCamelCase     (				self		:     Union[str, Any]   ):



   '''simple docstring'''




   if self.is_empty():
     raise IndexError("remove_first from empty list"   )
   return self._delete(self._header._next   )







 def        UpperCamelCase     (				self		:     str   ):



   '''simple docstring'''




   if self.is_empty():
     raise IndexError("remove_first from empty list"   )
   return self._delete(self._trailer._prev   )





'''simple docstring'''





from math import cos, sin







def snake_case_    (				lowercase__		):
  UpperCAmelCase__			:				List[Any]												=       float(lowercase__		)
  return [[scaling_factor * int(x == y		) for x in range(2		)] for y in range(2		)]







def snake_case_    (				lowercase__		):
  UpperCAmelCase__					, UpperCAmelCase__			:				List[Any]												=       cos(lowercase__		), sin(lowercase__		)
  return [[c, -s], [s, c]]







def snake_case_    (				lowercase__		):
  UpperCAmelCase__					, UpperCAmelCase__			:				Dict												=       cos(lowercase__		), sin(lowercase__		)
  UpperCAmelCase__			:				Tuple												=       c * s
  return [[c * c, cs], [cs, s * s]]







def snake_case_    (				lowercase__		):
  UpperCAmelCase__					, UpperCAmelCase__			:				Dict												=       cos(lowercase__		), sin(lowercase__		)
  UpperCAmelCase__			:				Any												=       c * s
  return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(F'    {scaling(5) = }')
print(F'  {rotation(4_5) = }')
print(F'{projection(4_5) = }')






print(F'{reflection(4_5) = }')



