l.add(new PCommand(0, null));
l.add(new PCommand(0));
	public static List<PCommand> lcs2(String[] a, String[] b) {	    int[][] lengths = new int[a.length+1][b.length+1];	 	    // row 0 and column 0 are initialized to 0 already	 	    for (int i = 0; i < a.length; i++)	        for (int j = 0; j < b.length; j++)	            if (a[i].equals(b[j]))	                lengths[i+1][j+1] = lengths[i][j] + 1;	            else	                lengths[i+1][j+1] =	                    Math.max(lengths[i+1][j], lengths[i][j+1]);	 	    // read the substring out from the matrix	    List<PCommand> l = new LinkedList<PCommand>();	    for (int x = a.length, y = b.length;	         x != 0 && y != 0; ) {	        if (lengths[x][y] == lengths[x-1][y]) {	        	l.add(new PCommand(2, null));	        	x--;	        } else if (lengths[x][y] == lengths[x][y-1]) {	        	byte[] by = new byte[b[y-1].length() - 1];	        	b[y-1].getBytes(1, b[y-1].length(), by, 0);	        	l.add(new PCommand(1, by));	        	y--;	            	        } else {	        	l.add(new PCommand(0, null));	        		        	x--;	            y--;	        }	    }	 	    return l;	}