import adt.graph.GraphNode;
public class Q003A_Clone_Graph_DFS {
public static void main(String[] args) {
GraphNode n0 = new GraphNode(0);
GraphNode n1 = new GraphNode(1);
GraphNode n2 = new GraphNode(2);
GraphNode n3 = new GraphNode(3);
GraphNode n4 = new GraphNode(4);
GraphNode n5 = new GraphNode(5);
GraphNode n6 = new GraphNode(6);
GraphNode n7 = new GraphNode(7);
GraphNode n8 = new GraphNode(8);
n0.addNeighbors(new GraphNode[]{n1, n7});
n1.addNeighbors(new GraphNode[]{n0, n2, n7});
n2.addNeighbors(new GraphNode[]{n1, n3, n5, n8});
n3.addNeighbors(new GraphNode[]{n2, n4, n5});
n4.addNeighbors(new GraphNode[]{n3, n5});
n5.addNeighbors(new GraphNode[]{n2, n3, n4, n6});
n6.addNeighbors(new GraphNode[]{n5, n7, n8});
n7.addNeighbors(new GraphNode[]{n0, n1, n6, n8});
n8.addNeighbors(new GraphNode[]{n2, n6, n7});
n0.printDFS();
GraphNode copy1 = cloneGraph(n0, new HashMap<GraphNode, GraphNode>());
copy1.printDFS();
GraphNode copy2 = cloneGraph(n0);
copy2.printDFS();
}