transform a text file to matrix > node > BFS