
"""simple docstring"""




def 							a__ (				lowerCAmelCase	:       dict		):






     '''simple docstring'''
     UpperCAmelCase__							: Tuple 							=						set()
     # edges = list of graph's edges
     UpperCAmelCase__							: Tuple 							=						get_edges(lowerCAmelCase		)

     # While there are still elements in edges list, take an arbitrary edge
     # (from_node, to_node) and add his extremity to chosen_vertices and then
     # remove all arcs adjacent to the from_node and to_node
     while edges:
          UpperCAmelCase__							,	UpperCAmelCase__							: int 							=						edges.pop()
          chosen_vertices.add(lowerCAmelCase		)
          chosen_vertices.add(lowerCAmelCase		)
          for edge in edges.copy():
               if from_node in edge or to_node in edge:
                    edges.discard(lowerCAmelCase		)
     return chosen_vertices



def 							a__ (				lowerCAmelCase	:       dict		):






     '''simple docstring'''
     UpperCAmelCase__							: Tuple 							=						set()
     for from_node, to_nodes in graph.items():
          for to_node in to_nodes:
               edges.add((from_node, to_node)		)
     return edges


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    # graph = {0: [1, 3], 1: [0, 3], 2: [0, 3, 4], 3: [0, 1, 2], 4: [2, 3]}
    # print(f"Matching vertex cover:\n{matching_min_vertex_cover(graph)}")





"""simple docstring"""




import math



def 							a__ (				lowerCAmelCase	:       int		):






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



def 							a__ (				lowerCAmelCase	:       int = 1_0001		):






     '''simple docstring'''

     try:
          UpperCAmelCase__							: List[str] 							=						int(lowerCAmelCase		)
     except (TypeError, ValueError):
          raise TypeError("Parameter nth must be int or castable to int."		) from None
     if nth <= 0:
          raise ValueError("Parameter nth must be greater than or equal to one."		)
     UpperCAmelCase__							: list[int] 							=						[]
     UpperCAmelCase__							: str 							=						2
     while len(lowerCAmelCase		) < nth:
          if is_prime(lowerCAmelCase		):
               primes.append(lowerCAmelCase		)
               num += 1
          else:
               num += 1
     return primes[len(lowerCAmelCase		) - 1]


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



