






'''simple docstring'''





from __future__ import annotations

from typing import Generic, TypeVar

__A				:				Union[str, Any]					=		TypeVar("""T""")
class 					lowercase							(				Generic[T]   ):


    '''simple docstring'''

    def __init__(       self  :  Dict					,  __lowerCamelCase  :  T  )				->				Optional[Any]:

     '''simple docstring'''




     lowerCamelCase__	=  data  # Assign data
     lowerCamelCase__	=  None  # Initialize next as null
     lowerCamelCase__	=  None  # Initialize prev as null
class 					lowercase							(				Generic[T]   ):


    '''simple docstring'''

    def __init__(       self  :  Tuple  )				->				None:

     '''simple docstring'''




     lowerCamelCase__	=  None

    def  a__					(       self  :  int					,  __lowerCamelCase  :  T  )				->				None:

     '''simple docstring'''




     if self.head is None:
      lowerCamelCase__	=  Node(__lowerCamelCase  )
     else:
      lowerCamelCase__	=  Node(__lowerCamelCase  )
      lowerCamelCase__	=  new_node
      lowerCamelCase__	=  self.head
      lowerCamelCase__	=  None
      lowerCamelCase__	=  new_node

    def  a__					(       self  :  List[str]  )				->				T | None:

     '''simple docstring'''




     if self.head is None:
      return None
     else:
      assert self.head is not None
      lowerCamelCase__	=  self.head.data
      lowerCamelCase__	=  self.head.next
      if self.head is not None:
       lowerCamelCase__	=  None
      return temp

    def  a__					(       self  :  List[str]  )				->				T | None:

     '''simple docstring'''




     return self.head.data if self.head is not None else None

    def __len__(       self  :  Optional[Any]  )				->				int:

     '''simple docstring'''




     lowerCamelCase__	=  self.head
     lowerCamelCase__	=  0
     while temp is not None:
      count += 1
      lowerCamelCase__	=  temp.next
     return count

    def  a__					(       self  :  Tuple  )				->				bool:

     '''simple docstring'''




     return self.head is None




    def  a__					(       self  :  int  )				->				None:

     '''simple docstring'''




     print("stack elements are:"  )
     lowerCamelCase__	=  self.head
     while temp is not None:
      print(temp.data					,  end="->"  )
      lowerCamelCase__	=  temp.next


# Code execution starts here
if __name__ == "__main__":
 # Start with the empty stack
 __A				:				Stack[int]					=		Stack()

 # Insert 4 at the beginning. So stack becomes 4->None
 print("""Stack operations using Doubly LinkedList""")
 stack.push(4)

 # Insert 5 at the beginning. So stack becomes 4->5->None
 stack.push(5)

 # Insert 6 at the beginning. So stack becomes 4->5->6->None
 stack.push(6)

 # Insert 7 at the beginning. So stack becomes 4->5->6->7->None
 stack.push(7)

 # Print the stack
 stack.print_stack()

 # Print the top element
 print("""\nTop element is """, stack.top())

 # Print the stack size
 print("""Size of the stack is """, len(stack))

 # pop the top element
 stack.pop()

 # pop the top element
 stack.pop()

 # two elements have now been popped off
 stack.print_stack()

 # Print True if the stack is empty else False
 print("""\nstack is empty:""", stack.is_empty())









'''simple docstring'''





from math import cos, sin






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	=  float(lowercase__)
 return [[scaling_factor * int(x == y) for x in range(2)] for y in range(2)]






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	,						lowerCamelCase__	=  cos(lowercase__), sin(lowercase__)
 return [[c, -s], [s, c]]






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	,						lowerCamelCase__	=  cos(lowercase__), sin(lowercase__)
 lowerCamelCase__	=  c * s
 return [[c * c, cs], [cs, s * s]]






def  lowerCamelCase_  (     lowercase__):
 lowerCamelCase__	,						lowerCamelCase__	=  cos(lowercase__), sin(lowercase__)
 lowerCamelCase__	=  c * s
 return [[2 * c - 1, 2 * cs], [2 * cs, 2 * s - 1]]


print(F"""    {scaling(5) = }""")
print(F"""  {rotation(45) = }""")
print(F"""{projection(45) = }""")
print(F"""{reflection(45) = }""")

