private static int[] LastNWLine(int m, int n, String A, String B) {
		int[][] K = new int[2][n + 1];
		for (int i = 1; i <= m; i++) {
			for (int j = 0; j <= n; j++)
				K[0][j] = K[1][j];
			for (int j = 1; j <= n; j++) {
				if (A.charAt(i - 1) == B.charAt(j - 1))
					K[1][j] = K[0][j - 1] + 1;
				else
					K[1][j] = Math.max(K[1][j - 1], K[0][j]);
				if (i == m && j == n)
					return K[1];
			}
		}
		return null;
	}