public static void strongconnect(Vertex v) {
		v.setIndex(index);
		v.setLowlink(index);
		index++;
		s.push(v);
		ArrayList<Vertex> current = new ArrayList<Vertex>();
		ArrayList<Vertex> adj = v.getAdjacent();
		for (int i = 0; i < adj.size(); i++) {
			Vertex w = adj.get(i);
			if (adj.get(i).getIndex() == -1) {

				strongconnect(w);
				v.setLowlink(Math.min(v.getLowlink(), w.getLowlink()));
			}
			else if(s.contains(w)){
				v.setLowlink(Math.min(v.getLowlink(), w.getIndex()));
			}
		}
		if (v.lowlink==v.index) {
			boolean flag = false;
			Vertex w;
			do {
				flag=true;
				 w = s.pop();
				 current.add(w);
			} while (w.id!=v.id);
			for (int i = 0; i < current.size(); i++) {
				System.out.print(current.get(i).id+" ");
			}
			if(flag)
			System.out.println();
		}

	}