breath-first traversal.