Heroes live in a big fantasy world with N cities. Since they have lots of jobs to handle around
many years, they agreed to use special passages for transportation. Every passage must be one directional. Heroes have already decided which passages they want to use and in which order
they should be.
Head of the heroes, Jason Scott, asked for your help to check the list of passages and find which
of them should not build. He doesn’t expect that heroes get stuck in an infinite loop with
passages since their time is worth.
The input file is a txt file that includes the information to build your directed graph structure as
The first line shows number of cities, N, in fantasy world (cities are labeled between 1 to N)
Next line represents number of passages, T
Remaining next T lines are the decided passages by heroes (i.e. one-directional directed
edges between cities)