private void dfs(Graph<?> G, Object v, Object w) {
        this.marked.put(v, true);
        this.path.add(v);

        System.out.println(path);

        for (Object temp : G.getAdjacentVertices(v)) {
            if (temp.equals(w)) continue;
            if (path.contains(temp)) {
                break;
            }
            if (!marked.get(temp)) dfs(G, temp, v);
        }
    }