






"""simple docstring"""
class 						a_ :







      '''simple docstring'''

      def __init__(self   ):

       '''simple docstring'''



       lowerCamelCase__	:     Dict								=		[0]
       lowerCamelCase__	:     Any								=		0




      def      a__				(self,	lowerCamelCase_   ):

       '''simple docstring'''



       lowerCamelCase__	:     List[str]								=		self.__heap[i]
       while i // 2 > 0:
        if self.__heap[i] > self.__heap[i // 2]:
         lowerCamelCase__	:     Optional[int]								=		self.__heap[i // 2]
         lowerCamelCase__	:     Tuple								=		temporary
        i //= 2




      def      a__				(self,	lowerCamelCase_   ):

       '''simple docstring'''



       self.__heap.append(lowerCamelCase_   )
       self.__size += 1
       self.__swap_up(self.__size   )




      def      a__				(self,	lowerCamelCase_   ):

       '''simple docstring'''



       while self.__size >= 2 * i:
        if 2 * i + 1 > self.__size:
         lowerCamelCase__	:     List[str]								=		2 * i
        else:
         if self.__heap[2 * i] > self.__heap[2 * i + 1]:
          lowerCamelCase__	:     Optional[int]								=		2 * i
         else:
          lowerCamelCase__	:     Tuple								=		2 * i + 1
        lowerCamelCase__	:     Any								=		self.__heap[i]
        if self.__heap[i] < self.__heap[bigger_child]:
         lowerCamelCase__	:     Dict								=		self.__heap[bigger_child]
         lowerCamelCase__	:     Any								=		temporary
        lowerCamelCase__	:     Any								=		bigger_child




      def      a__				(self   ):

       '''simple docstring'''



       lowerCamelCase__	:     Dict								=		self.__heap[1]
       lowerCamelCase__	:     str								=		self.__heap[self.__size]
       self.__size -= 1
       self.__heap.pop()
       self.__swap_down(1   )
       return max_value




      @property
      def      a__				(self   ):

       '''simple docstring'''



       return self.__heap[1:]





      def __len__(self   ):

       '''simple docstring'''



       return self.__size


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      # create an instance of BinaryHeap
      A_     :					str							=     BinaryHeap()
      binary_heap.insert(6)
      binary_heap.insert(10)
      binary_heap.insert(15)
      binary_heap.insert(12)
      # pop root(max-values because it is max heap)
      print(binary_heap.pop())  # 15
      print(binary_heap.pop())  # 12
      # get the list and size after operations
      print(binary_heap.get_list)
      print(len(binary_heap))









"""simple docstring"""
from __future__ import annotations






def 			lowerCamelCase_    (		_lowerCamelCase							):
 lowerCamelCase__	:     int
 lowerCamelCase__	:     list[str]								=		list(_lowerCamelCase							)
 lowerCamelCase__							,	lowerCamelCase__	:     Union[str, Any]								=		_vector[:-1], int(_vector[-1]							)
 lowerCamelCase__	:     list[int]								=		[int(_lowerCamelCase							) for digit in __vector]

 vector.reverse()
 for i, digit in enumerate(_lowerCamelCase							):
  if i & 1 == 0:
   lowerCamelCase__	:     int								=		digit * 2
   if doubled > 9:
    doubled -= 9
   check_digit += doubled
  else:
   check_digit += digit

 return check_digit % 10 == 0


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      assert is_luhn("79927398713")
      assert not is_luhn("79927398714")

