First bfs searching and markup (working examples: 2, 3)