new_contents: class LinkedStack:
      class _Node:
          __slots__ = '_element', '_next'
  
          def __init__(self, element, next):
              self._element = element
              self._next = next
      
      def __init__(self):
          self._head = None
          self._size = 0
  
      def push(self, e):
          self._head = self._Node(e, self._head)
          self._size += 1
  
      def pop(self):
          e = self._head._element
          self._head = self._head._next
          self._size -= 1
          return e
  
      def __len__(self):
          return self._size
  
subject: Add LinkedStack