public void process() {
      for (int node : graph.keySet()) {
        Set<Integer> visited = new HashSet<Integer>();
        Queue<Integer> search = new LinkedList<Integer>();
        visited.add(node);
        search.add(node);
        
        while (search.size() > 0) {
          int cur = search.poll();
          for (int next : graph.get(cur)) {
            if (reachable[next] != null) {
              visited.addAll(reachable[next]);
            } else if (!visited.contains(next)) {
              visited.add(next);
              search.add(next);
            }
          }
        }
        
        reachable[node] = visited;
      }
    }