"""simple docstring"""






from __future__ import annotations

from typing import Generic, TypeVar

__A         =				TypeVar("T")


class 					UpperCAmelCase		(Generic[T]						):



    """simple docstring"""

    def __init__(     self					,    _UpperCAmelCase							):
       lowercase__:     Dict      =   data  # Assign data
       lowercase__:     Node[T] | None      =   None  # Initialize next as null
       lowercase__:     Node[T] | None      =   None  # Initialize prev as null



class 					UpperCAmelCase		(Generic[T]						):



    """simple docstring"""

    def __init__(     self							):
       lowercase__:     Node[T] | None      =   None






    def _snake_case    (     self					,    _UpperCAmelCase							):
       if self.head is None:
          lowercase__:     List[Any]      =   Node(_UpperCAmelCase							)
       else:
          lowercase__:     str      =   Node(_UpperCAmelCase							)
          lowercase__:     List[Any]      =   new_node
          lowercase__:     List[str]      =   self.head
          lowercase__:     List[Any]      =   None
          lowercase__:     List[Any]      =   new_node






    def _snake_case    (     self							):
       if self.head is None:
          return None
       else:
          assert self.head is not None
          lowercase__:     List[str]      =   self.head.data
          lowercase__:     Any      =   self.head.next
          if self.head is not None:
             lowercase__:     Dict      =   None
          return temp






    def _snake_case    (     self							):
       return self.head.data if self.head is not None else None






    def __len__(     self							):
       lowercase__:     str      =   self.head
       lowercase__:     List[str]      =   0
       while temp is not None:
          count += 1
          lowercase__:     Optional[int]      =   temp.next
       return count






    def _snake_case    (     self							):
       return self.head is None






    def _snake_case    (     self							):
       print('''stack elements are:'''							)
       lowercase__:     Optional[int]      =   self.head
       while temp is not None:
          print(temp.data					,    end='''->'''							)
          lowercase__:     Optional[Any]      =   temp.next


# Code execution starts here
if __name__ == "__main__":
       # Start with the empty stack
       __A         =				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"""






def SCREAMING_SNAKE_CASE__    (     __UpperCAmelCase				)						->						Optional[int]:
   lowercase__:     str      =   [7_0_1, 3_0_1, 1_3_2, 5_7, 2_3, 1_0, 4, 1]
   for gap in gaps:
      for i in range(__UpperCAmelCase ,					len(__UpperCAmelCase				)				):
         lowercase__:     Any      =   collection[i]
         lowercase__:     Tuple      =   i
         while j >= gap and collection[j - gap] > insert_value:
            lowercase__:     List[str]      =   collection[j - gap]
            j -= gap
         if j != i:
            lowercase__:     List[str]      =   insert_value
   return collection


if __name__ == "__main__":
       from doctest import testmod

       testmod()
       __A         =				input("Enter numbers separated by a comma:\n").strip()
       __A         =				[int(item) for item in user_input.split(",")]
       print(shell_sort(unsorted))
