static String mostCommonSubstring(String s) {
		int n=s.length();
		int[][] t=new int[n+1][n+1];
		for (int i=1;i<=n;++i)
			for (int j=i+1;j<=n;++j)
				if (s.charAt(i-1)==s.charAt(j-1)) t[i][j]=t[i-1][j-1]+1;
		int imax=-1,max=-1;
		for (int i=1;i<=n;++i)
			for (int j=i;j<=n;++j)
				if (t[i][j]>max) {imax=i;max=t[i][j];}
		return s.substring(imax-max, imax);
	}