





from __future__ import annotations

from collections.abc import Iterator
from typing import Any

class 		SCREAMING_SNAKE_CASE__    :


      def __init__(self	:				Tuple    ,      a__	:				Any				):





         """simple docstring"""



         __snake_case								=       data
         __snake_case								=       None






class 		SCREAMING_SNAKE_CASE__    :


      def __init__(self	:				str				):





         """simple docstring"""



         __snake_case								=       None
         __snake_case								=       None


      def __iter__(self	:				Tuple				):





         """simple docstring"""



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


      def __len__(self	:				Optional[int]				):





         """simple docstring"""



         return sum(1 for _ in self				)


      def __repr__(self	:				str				):





         """simple docstring"""



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


      def        a			(self	:				Union[str, Any]    ,      a__	:				Any				):





         """simple docstring"""



         self.insert_nth(len(self				)    ,      a__				)


      def        a			(self	:				int    ,      a__	:				Any				):





         """simple docstring"""



         self.insert_nth(0    ,      a__				)


      def        a			(self	:				Tuple    ,      a__	:				int    ,      a__	:				Any				):





         """simple docstring"""



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


      def        a			(self	:				int				):





         """simple docstring"""



         return self.delete_nth(0				)


      def        a			(self	:				List[str]				):





         """simple docstring"""



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


      def        a			(self	:				List[str]    ,      a__	:				int = 0				):





         """simple docstring"""



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


      def        a			(self	:				str				):





         """simple docstring"""



         return len(self				) == 0






def lowerCamelCase__   (							)				->    None:
   __snake_case								=       CircularLinkedList()
   assert len(snake_case_	) == 0
   assert circular_linked_list.is_empty() is True
   assert str(snake_case_	) == ""

   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(snake_case_	) == i
      circular_linked_list.insert_nth(snake_case_	,				i + 1	)
   assert str(snake_case_	) == "->".join(str(snake_case_	) for i in range(1	,				6	)	)

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

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

   circular_linked_list.insert_nth(2	,				3	)
   assert str(snake_case_	) == "->".join(str(snake_case_	) 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

snake_case_           =      [True] * 1000001
snake_case_           =      2
while i * i <= 1000000:
    if seive[i]:
        for j in range(i * i, 1000001, i):
            snake_case_           =      False
    i += 1






def lowerCamelCase__   (							snake_case_     :  int	)				->    bool:
   return seive[n]






def lowerCamelCase__   (							snake_case_     :  int	)				->    bool:
   return any(digit in '''02468''' for digit in str(snake_case_	)	)






def lowerCamelCase__   (							snake_case_     :  int = 100_0000	)				->    list[int]:
   __snake_case								=       [2]  # result already includes the number 2.
   for num in range(3	,				limit + 1	,				2	):
      if is_prime(snake_case_	) and not contains_an_even_digit(snake_case_	):
         __snake_case								=       str(snake_case_	)
         __snake_case								=       [int(str_num[j:] + str_num[:j]	) for j in range(len(snake_case_	)	)]
         if all(is_prime(snake_case_	) for i in list_nums	):
            result.append(snake_case_	)
   return result






def lowerCamelCase__   (							)				->    int:
   return len(find_circular_primes()	)


if __name__ == "__main__":
    print(F'{len(find_circular_primes()) = }')

