Anonymous Content interview question

you got a tree and asked to make prints by lateral scanning. Using the BFS algorithm