


'''simple docstring'''



def 			_a			(		_lowercase      :			dict						):





     '''simple docstring'''






     __UpperCAmelCase			:				set[int]													=    set()
     # To detect a back edge, keep track of vertices currently in the recursion stack
     __UpperCAmelCase			:				set[int]													=    set()
     return any(
         node not in visited and depth_first_search(__UpperCamelCase    ,      __UpperCamelCase    ,      __UpperCamelCase    ,      __UpperCamelCase						)
         for node in graph						)




def 			_a			(		_lowercase      :			dict    ,      _lowercase      :			int    ,      _lowercase      :			set    ,      _lowercase      :			set						):





     '''simple docstring'''






     visited.add(__UpperCamelCase						)
     rec_stk.add(__UpperCamelCase						)

     for node in graph[vertex]:
          if node not in visited:
               if depth_first_search(__UpperCamelCase    ,      __UpperCamelCase    ,      __UpperCamelCase    ,      __UpperCamelCase						):
                    return True
          elif node in rec_stk:
               return True

    # The node needs to be removed from recursion stack before function ends
     rec_stk.remove(__UpperCamelCase						)
     return False


if __name__ == "__main__":
      from doctest import testmod

      testmod()



'''simple docstring'''



from __future__ import annotations




def 			_a			(		_lowercase      :			int						):





     '''simple docstring'''






     __UpperCAmelCase			:				str													=    [True] * limit
     __UpperCAmelCase			:				Tuple													=    False
     __UpperCAmelCase			:				List[str]													=    False
     __UpperCAmelCase			:				List[Any]													=    True

     for i in range(3    ,      int(limit**0.5 + 1						)    ,      2						):
          __UpperCAmelCase			:				Dict													=    i * 2
          while index < limit:
               __UpperCAmelCase			:				Optional[int]													=    False
               __UpperCAmelCase			:				Union[str, Any]													=    index + i

     __UpperCAmelCase			:				Optional[Any]													=    [2]

     for i in range(3    ,      _lowercase    ,      2						):
          if is_prime[i]:
               primes.append(_lowercase						)

     return primes




def 			_a			(		_lowercase      :			int = 1000000						):





     '''simple docstring'''






     __UpperCAmelCase			:				List[str]													=    prime_sieve(_lowercase						)
     __UpperCAmelCase			:				Optional[Any]													=    0
     __UpperCAmelCase			:				int													=    0

     for i in range(len(_lowercase						)						):
          for j in range(i + length    ,      len(_lowercase						)						):
               __UpperCAmelCase			:				Optional[Any]													=    sum(primes[i:j]						)
               if sol >= ceiling:
                    break

               if sol in primes:
                    __UpperCAmelCase			:				Any													=    j - i
                    __UpperCAmelCase			:				List[Any]													=    sol

     return largest


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