





'''simple docstring'''


def 							UpperCAmelCase_  (						__lowerCamelCase : dict			):






   """simple docstring"""




   lowercase_      :int         =			set()
   # edges = list of graph's edges
   lowercase_      :List[Any]         =			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:
      lowercase_      :Optional[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 							UpperCAmelCase_  (						__lowerCamelCase : dict			):






   """simple docstring"""




   lowercase_      :Union[str, Any]         =			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'''


def 							UpperCAmelCase_  (						__lowerCamelCase : str     ,__lowerCamelCase : str			):
   lowercase_      :Optional[Any]         =			len(__lowerCamelCase			)
   lowercase_      :List[Any]         =			[]
   for i in range(len(__lowerCamelCase			) - pat_len + 1			):
      lowercase_      :Dict         =			True
      for j in range(__lowerCamelCase			):
         if s[i + j] != pattern[j]:
            lowercase_      :int         =			False
            break
      if match_found:
         position.append(__lowerCamelCase			)
   return position


if __name__ == "__main__":
 assert naive_pattern_search('''ABCDEFG''', '''DE''') == [3]
 print(naive_pattern_search('''ABAAABCDBBABCDDEBCABC''', '''ABC'''))


