public static void main(String[] args) throws FileNotFoundException, IOException {
		System.out.println("loading graph...");
		Kosaraju kos = new Kosaraju();

		System.out.println("1st pass...");
		kos.dfsLoop(null, kos.gRev, 1);

		/* reset the visited[] for the second pass */
		for (int i=0; i<kos.N; i++) kos.visited[i] = 0;
		int[] nodes = new int[kos.N];
		
		/* store the nodes in increasing order of their finishing times */
		for (int i=0; i<kos.N; i++) nodes[kos.finishingTime[i]-1] = i;
		System.out.println("2nd pass...");
		kos.dfsLoop(nodes, kos.g, 2);

		System.out.print("The sizes of the 5 largest SCC's are : ");
		Arrays.sort(kos.leader); // sort by leader notes
		ArrayList<Integer> stat = new ArrayList<Integer>(1);
		int pre = 0;
		for (int i=0; i<kos.N-1; i++){
			if (kos.leader[i] != kos.leader[i+1]){
				stat.add(new Integer(i-pre+1));
				pre = i+1;
			}
		}
		stat.add(new Integer(kos.N-pre)); // get the last one
		Integer[] s1 = stat.toArray(new Integer[stat.size()]);
		int[] s = new int[s1.length];
		for (int i=0; i<s1.length; i++) s[i] = s1[i].intValue();
		Arrays.sort(s);
		int i = s.length-1, j = 0;
		/* print only the top 5 largest SCC's */
		for (; j<5; j++,i--) System.out.print(s[i]+" ");
		System.out.println();
	}