
'''simple docstring'''






from __future__ import annotations

A			      =      [True] * 100_0001
A			      =      2
while i * i <= 100_0000:
					if seive[i]:
										for j in range(i * i, 100_0001, i):
															A			      =      False
					i += 1





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				return seive[n]





def    UpperCAmelCase							(  UpperCAmelCase__							:							int):
				return any(digit in '02468' for digit in str(UpperCAmelCase__))





def    UpperCAmelCase							(  UpperCAmelCase__							:							int = 1_00_00_00):
				lowerCamelCase					:			Union[str, Any]									= [2]  # result already includes the number 2.
				for num in range(3       ,							limit + 1       ,							2):
								if is_prime(UpperCAmelCase__) and not contains_an_even_digit(UpperCAmelCase__):
												lowerCamelCase					:			Union[str, Any]									= str(UpperCAmelCase__)
												lowerCamelCase					:			Optional[Any]									= [int(str_num[j:] + str_num[:j]) for j in range(len(UpperCAmelCase__))]
												if all(is_prime(UpperCAmelCase__) for i in list_nums):
																result.append(UpperCAmelCase__)
				return result





def    UpperCAmelCase							(  ):
				return len(find_circular_primes())


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


'''simple docstring'''






A			      =      {'a': ['c', 'b'], 'b': ['d', 'e'], 'c': [], 'd': [], 'e': []}
A			      =      ['a', 'b', 'c', 'd', 'e']





def    UpperCAmelCase							(  UpperCAmelCase__							:							Union[str, Any]       ,							UpperCAmelCase__							:							Any       ,							UpperCAmelCase__							:							List[Any]):
				lowerCamelCase					:			List[Any]									= start
				# add current to visited
				visited.append(UpperCAmelCase__)
				lowerCamelCase					:			List[str]									= edges[current]
				for neighbor in neighbors:
								# if neighbor not in visited, visit
								if neighbor not in visited:
												lowerCamelCase					:			Any									= topological_sort(UpperCAmelCase__       ,							UpperCAmelCase__       ,							UpperCAmelCase__)
    # if all neighbors visited add current to sort
				sort.append(UpperCAmelCase__)
				# if all vertices haven't been visited select a new one to visit
				if len(UpperCAmelCase__) != len(UpperCAmelCase__):
								for vertice in vertices:
												if vertice not in visited:
																lowerCamelCase					:			List[str]									= topological_sort(UpperCAmelCase__       ,							UpperCAmelCase__       ,							UpperCAmelCase__)
    # return sort
				return sort


if __name__ == "__main__":
					A			      =      topological_sort('a', [], [])
					print(sort)
