static void breadthFirstSearch(Node root, Consumer<Node> f) {
Queue<Node> queue = new LinkedList<>();
queue.offer(root);
while(!queue.isEmpty()) {
Node polled = queue.poll();
f.accept(polled);
polled.children.forEach(a -> queue.offer(a));
}
}