Write a program in C++/Java that performs a DFS onfollowinggraphandouputsedges with labels tree edge back edge forward edge and cross edge.Submit your program and screen shot of outputs in a single word/pdffile.
Your program should accept following file as an input. You have to write code to process this input. You should define and use adjacency list representation of graph.
The input in the file is in this format:
First line is number of nodes.
Rest of lines are in thisformat: node number (node degree) : adjacency list