import java.util.*; class editbrute { static class cell { int cost, parent; } static final int MAXLEN = 100; static cell m[][] = new cell[MAXLEN][MAXLEN]; static final int MATCH = 0; static final int INSERT = 1; static final int DELETE = 2; static int indel(char c) { return 1; } static int match(char c, char d) { if(c==d) return 0; return 1; } static void row_init(int i) { m[0][i].cost = i; if (i>0) m[0][i].parent = INSERT; else m[0][i].parent = -1; } static void column_init(int i) { m[i][0].cost = i; if (i>0) m[i][0].parent = DELETE; else m[0][i].parent = -1; } static int string_compare(String s, String t, int i, int j) { int k, lowest_cost; int opt[] = new int [3]; if(i==0) return j*indel(' '); if(j==0) return i*indel(' '); opt[MATCH] = string_compare(s,t,i-1,j-1) + match(s.charAt(i),t.charAt(j)); opt[INSERT] = string_compare(s,t,i,j-1) + indel(t.charAt(j)); opt[DELETE] = string_compare(s,t,i-1,j) + indel(s.charAt(i)); lowest_cost = opt[MATCH]; int best = MATCH; for(k=INSERT;k<=DELETE;k++) if(opt[k]