<p>Given a reference of a node in a <strong><ahref="https://en.wikipedia.org/wiki/Connectivity_(graph_theory)#Connected_graph"target="_blank">connected</a></strong> undirected graph.</p>
<p>Return a <ahref="https://en.wikipedia.org/wiki/Object_copying#Deep_copy"target="_blank"><strong>deep copy</strong></a> (clone) of the graph.</p>
<p>Each node in the graph contains a value (<code>int</code>) and a list (<code>List[Node]</code>) of its neighbors.</p>
<pre>
class Node {
public int val;
public List<Node> neighbors;
}
</pre>
<p> </p>
<p><strong>Test case format:</strong></p>
<p>For simplicity, each node's value is the same as the node's index (1-indexed). For example, the first node with <code>val == 1</code>, the second node with <code>val == 2</code>, and so on. The graph is represented in the test case using an adjacency list.</p>
<p><b>An adjacency list</b> is a collection of unordered <b>lists</b> used to represent a finite graph. Each list describes the set of neighbors of a node in the graph.</p>
<p>The given node will always be the first node with <code>val = 1</code>. You must return the <strong>copy of the given node</strong> as a reference to the cloned graph.</p>
<strong>Explanation:</strong> Note that the input contains one empty list. The graph consists of only one node with val = 1 and it does not have any neighbors.