Now do you know how to modify the above code so that it would read the input data(in the same format as presented in comments section) from a text file (each in a new line). Actually I want to represent the Nx2 output which is ::: ==========connections====== from->to a b c d a d