


from __future__ import annotations

from collections.abc import Iterator
from typing import Any






class 	__lowercase					:





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






         """simple docstring"""







         UpperCAmelCase      					=  data
         UpperCAmelCase      					=  None






class 	__lowercase					:





      def __init__(		self    :       Optional[int]							)     -> List[str]:






         """simple docstring"""







         UpperCAmelCase      					=  None
         UpperCAmelCase      					=  None





      def __iter__(		self    :       List[Any]							)     -> Iterator[Any]:






         """simple docstring"""







         UpperCAmelCase      					=  self.head
         while self.head:
            yield node.data
            UpperCAmelCase      					=  node.next
            if node == self.head:
               break





      def __len__(		self    :       Tuple							)     -> int:






         """simple docstring"""







         return sum(1 for _ in self							)





      def __repr__(		self    :       Union[str, Any]							)     -> List[Any]:






         """simple docstring"""







         return "->".join(str(__lowerCamelCase							) for item in iter(self							)							)





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






         """simple docstring"""







         self.insert_nth(len(self							)       ,							__lowerCamelCase							)





      def 							_lowercase					(		self    :       Dict       ,							__lowerCamelCase    :       Any							)     -> None:






         """simple docstring"""







         self.insert_nth(0       ,							__lowerCamelCase							)





      def 							_lowercase					(		self    :       Any       ,							__lowerCamelCase    :       int       ,							__lowerCamelCase    :       Any							)     -> None:






         """simple docstring"""







         if index < 0 or index > len(self							):
            raise IndexError("""list index out of range."""							)
         UpperCAmelCase      					=  Node(__lowerCamelCase							)
         if self.head is None:
            UpperCAmelCase      					=  new_node  # first node points itself
            UpperCAmelCase      					=  UpperCAmelCase      					=  new_node
         elif index == 0:  # insert at head
            UpperCAmelCase      					=  self.head
            UpperCAmelCase      					=  UpperCAmelCase      					=  new_node
         else:
            UpperCAmelCase      					=  self.head
            for _ in range(index - 1							):
               UpperCAmelCase      					=  temp.next
            UpperCAmelCase      					=  temp.next
            UpperCAmelCase      					=  new_node
            if index == len(self							) - 1:  # insert at tail
               UpperCAmelCase      					=  new_node





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






         """simple docstring"""







         return self.delete_nth(0							)





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






         """simple docstring"""







         return self.delete_nth(len(self							) - 1							)





      def 							_lowercase					(		self    :       Optional[Any]       ,							__lowerCamelCase    :       int = 0							)     -> Any:






         """simple docstring"""







         if not 0 <= index < len(self							):
            raise IndexError("""list index out of range."""							)
         UpperCAmelCase      					=  self.head
         if self.head == self.tail:  # just one node
            UpperCAmelCase      					=  UpperCAmelCase      					=  None
         elif index == 0:  # delete head node
            UpperCAmelCase      					=  self.tail.next.next
            UpperCAmelCase      					=  self.head.next
         else:
            UpperCAmelCase      					=  self.head
            for _ in range(index - 1							):
               UpperCAmelCase      					=  temp.next
            UpperCAmelCase      					=  temp.next
            UpperCAmelCase      					=  temp.next.next
            if index == len(self							) - 1:  # delete at tail
               UpperCAmelCase      					=  temp
         return delete_node.data





      def 							_lowercase					(		self    :       Tuple							)     -> bool:






         """simple docstring"""







         return len(self							) == 0

def 	_UpperCamelCase					(    )    ->None:
   UpperCAmelCase      					=  CircularLinkedList()
   assert len(lowerCAmelCase_ ) == 0
   assert circular_linked_list.is_empty() is True
   assert str(lowerCAmelCase_ ) == ""

   try:
      circular_linked_list.delete_front()
      raise AssertionError  # This should not happen
   except IndexError:
      assert True  # This should happen

   try:
      circular_linked_list.delete_tail()
      raise AssertionError  # This should not happen
   except IndexError:
      assert True  # This should happen

   try:
      circular_linked_list.delete_nth(-1 )
      raise AssertionError
   except IndexError:
      assert True

   try:
      circular_linked_list.delete_nth(0 )
      raise AssertionError
   except IndexError:
      assert True

   assert circular_linked_list.is_empty() is True
   for i in range(5 ):
      assert len(lowerCAmelCase_ ) == i
      circular_linked_list.insert_nth(lowerCAmelCase_	,    i + 1 )
   assert str(lowerCAmelCase_ ) == "->".join(str(lowerCAmelCase_ ) for i in range(1	,    6 ) )

   circular_linked_list.insert_tail(6 )
   assert str(lowerCAmelCase_ ) == "->".join(str(lowerCAmelCase_ ) for i in range(1	,    7 ) )
   circular_linked_list.insert_head(0 )
   assert str(lowerCAmelCase_ ) == "->".join(str(lowerCAmelCase_ ) for i in range(0	,    7 ) )

   assert circular_linked_list.delete_front() == 0
   assert circular_linked_list.delete_tail() == 6
   assert str(lowerCAmelCase_ ) == "->".join(str(lowerCAmelCase_ ) for i in range(1	,    6 ) )
   assert circular_linked_list.delete_nth(2 ) == 3

   circular_linked_list.insert_nth(2	,    3 )
   assert str(lowerCAmelCase_ ) == "->".join(str(lowerCAmelCase_ ) for i in range(1	,    6 ) )

   assert circular_linked_list.is_empty() is False


if __name__ == "__main__":
 import doctest

 doctest.testmod()







from __future__ import annotations

import math
def 	_UpperCamelCase					(    lowerCAmelCase_ )    ->bool:

   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(lowerCAmelCase_ ) + 1 )	,    6 ):
      if number % i == 0 or number % (i + 2) == 0:
         return False
   return True


__a	 =      [num for num in range(3, 10_0001, 2) if not is_prime(num)]
def 	_UpperCamelCase					(    lowerCAmelCase_ )    ->list[int]:
   if not isinstance(lowerCAmelCase_	,    lowerCAmelCase_ ):
      raise ValueError("""n must be an integer""" )
   if n <= 0:
      raise ValueError("""n must be >= 0""" )

   UpperCAmelCase      					=  []
   for num in range(len(lowerCAmelCase_ ) ):
      UpperCAmelCase      					=  0
      while 2 * i * i <= odd_composites[num]:
         UpperCAmelCase      					=  odd_composites[num] - 2 * i * i
         if is_prime(lowerCAmelCase_ ):
            break
         i += 1
      else:
         list_nums.append(odd_composites[num] )
         if len(lowerCAmelCase_ ) == n:
            return list_nums

   return []
def 	_UpperCamelCase					(    )    ->int:
   return compute_nums(1 )[0]


if __name__ == "__main__":
 print(F"""{solution() = }""")



