def bfs(node):
""" graph breadth-first search - iterative """
from collections import deque
q = deque()
q.append(node)
node.visited = True
while q:
current = d.popleft()
print(current)
for node in current.adjList:
if not node.visited:
q.append(node)
node.visited = True