input: Write a python function to perform BFS (Breadth-First Search) on a graph represented as an adjacency list.
  assert bfs({'A': {'B', 'C'}, 'B': {'A', 'D', 'E'}, 'C': {'A', 'F'}, 'D': {'B'}, 'E': {'B', 'F'}, 'F': {'C', 'E'}}, 'A') == {'A', 'B', 'C', 'D', 'E', 'F'}
  assert bfs({'1': {'2', '3'}, '2': {'1', '4', '5'}, '3': {'1', '6'}, '4': {'2'}, '5': {'2', '6'}, '6': {'3', '5'}}, '1') == {'1', '2', '3', '4', '5', '6'}
  assert bfs({'X': {'Y'}, 'Y': {'X', 'Z'}, 'Z': {'Y'}}, 'X') == {'X', 'Y', 'Z'}
output: def bfs(graph, start):
      visited = set()
      queue = [start]
      while queue:
          vertex = queue.pop(0)
          if vertex not in visited:
              visited.add(vertex)
              queue.extend(graph[vertex] - visited)
      return visited