

'''simple docstring'''
from __future__ import annotations

from typing import Any







class 							A__    :





  def __init__(		self      :	List[str]							,					_a      :	int = 6 )	->    None:





       '''simple docstring'''






       _SCREAMING_SNAKE_CASE							    =None
       _SCREAMING_SNAKE_CASE							    =None
       self.create_linked_list(_a )





  def 						A  (		self      :	Dict							,					_a      :	int )	->    None:





       '''simple docstring'''






       _SCREAMING_SNAKE_CASE							    =Node()
       _SCREAMING_SNAKE_CASE							    =current_node
       _SCREAMING_SNAKE_CASE							    =current_node
       _SCREAMING_SNAKE_CASE							    =current_node
       for _ in range(1							,					_a ):
            _SCREAMING_SNAKE_CASE							    =Node()
            _SCREAMING_SNAKE_CASE							    =current_node
            _SCREAMING_SNAKE_CASE							    =previous_node
            _SCREAMING_SNAKE_CASE							    =current_node
       _SCREAMING_SNAKE_CASE							    =self.front
       _SCREAMING_SNAKE_CASE							    =previous_node





  def 						A  (		self      :	Any )	->    bool:





       '''simple docstring'''






       return (
           self.front == self.rear
           and self.front is not None
           and self.front.data is None
       )





  def 						A  (		self      :	Any )	->    Any | None:





       '''simple docstring'''






       self.check_can_perform_operation()
       return self.front.data if self.front else None





  def 						A  (		self      :	List[str]							,					_a      :	Any )	->    None:





       '''simple docstring'''






       if self.rear is None:
            return

       self.check_is_full()
       if not self.is_empty():
            _SCREAMING_SNAKE_CASE							    =self.rear.next
       if self.rear:
            _SCREAMING_SNAKE_CASE							    =data





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





       '''simple docstring'''






       self.check_can_perform_operation()
       if self.rear is None or self.front is None:
            return None
       if self.front == self.rear:
            _SCREAMING_SNAKE_CASE							    =self.front.data
            _SCREAMING_SNAKE_CASE							    =None
            return data

       _SCREAMING_SNAKE_CASE							    =self.front
       _SCREAMING_SNAKE_CASE							    =old_front.next
       _SCREAMING_SNAKE_CASE							    =old_front.data
       _SCREAMING_SNAKE_CASE							    =None
       return data





  def 						A  (		self      :	Union[str, Any] )	->    None:





       '''simple docstring'''






       if self.is_empty():
            raise Exception('Empty Queue' )





  def 						A  (		self      :	str )	->    None:





       '''simple docstring'''






       if self.rear and self.rear.next == self.front:
            raise Exception('Full Queue' )







class 							A__    :





  def __init__(		self      :	List[Any] )	->    None:





       '''simple docstring'''






       _SCREAMING_SNAKE_CASE							    =None
       _SCREAMING_SNAKE_CASE							    =None
       _SCREAMING_SNAKE_CASE							    =None


if __name__ == "__main__":
     import doctest

     doctest.testmod()



'''simple docstring'''
from __future__ import annotations

import math


def        _lowerCAmelCase					(						_UpperCamelCase						:     int				)      ->			bool:
     """simple docstring"""




     if 1 < number < 4:
          # 2 and 3 are primes
          return True
     elif number < 2 or number % 2 == 0 or number % 3 == 0:
          # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
          return False

     # All primes number are in format of 6k +/- 1
     for i in range(5							, int(math.sqrt(_UpperCamelCase				) + 1				)							, 6				):
          if number % i == 0 or number % (i + 2) == 0:
               return False
     return True


def        _lowerCAmelCase					(						_UpperCamelCase						:     int				)      ->			list[int]:
     """simple docstring"""




     _SCREAMING_SNAKE_CASE							    =str(_UpperCamelCase				)
     _SCREAMING_SNAKE_CASE							    =[n]
     for i in range(1							, len(_UpperCamelCase				)				):
          list_nums.append(int(str_num[i:]				)				)
          list_nums.append(int(str_num[:-i]				)				)
     return list_nums


def        _lowerCAmelCase					(						_UpperCamelCase						:     int				)      ->			bool:
     """simple docstring"""




     if len(str(_UpperCamelCase				)				) > 3:
          if not is_prime(int(str(_UpperCamelCase				)[-3:]				)				) or not is_prime(int(str(_UpperCamelCase				)[:3]				)				):
               return False
     return True


def        _lowerCAmelCase					(						_UpperCamelCase						:     int = 11				)      ->			list[int]:
     """simple docstring"""




     _SCREAMING_SNAKE_CASE							    =[]
     _SCREAMING_SNAKE_CASE							    =13
     while len(_UpperCamelCase				) != count:
          if validate(_UpperCamelCase				):
               _SCREAMING_SNAKE_CASE							    =list_truncated_nums(_UpperCamelCase				)
               if all(is_prime(_UpperCamelCase				) for i in list_nums				):
                    list_truncated_primes.append(_UpperCamelCase				)
          num += 2
     return list_truncated_primes


def        _lowerCAmelCase					(						)      ->			int:
     """simple docstring"""




     return sum(compute_truncated_primes(11				)				)


if __name__ == "__main__":
     print(f'''{sum(compute_truncated_primes(1_1)) = }''')
