static int lc_helper(int[][]b, int i, int j, int v, int[][]t) {
		t[i][j]=++v;
		int m=b.length, n=b[0].length;
		int c=b[i][j];
		int rel=v;
		if (i+1<m&&b[i+1][j]==c+1) 
			rel=lc_helper(b,i+1,j,v,t);
		if (i-1>=0&&b[i-1][j]==c+1)
			rel=lc_helper(b,i-1,j,v,t);
		if (j+1<n&&b[i][j+1]==c+1)
			rel=lc_helper(b,i,j+1,v,t);
		if (j-1>=0&&b[i][j-1]==c+1)
			rel=lc_helper(b,i,j-1,v,t);
		return rel;
	}