#include <bits/stdc++.h>
char M[1002][1002], c[9];
long long unsigned C[1002][1002][27], T[27];
unsigned ii[333333], jj[333333], kk[333333];
unsigned II[333333], JJ[333333];
int main() {
  unsigned x, y, z, q, i, j, k, I, J;
  long long unsigned *D, r = -1, t;
  scanf("%u%u%u", &x, &y, &q);
  for (i = 0; ++i <= x;) scanf("%s", M[i] + 1);
  for (z = -1; ++z < q;) {
    scanf("%u%u%u%u%s", &i, &j, &I, &J, c);
    ii[z] = i;
    jj[z] = j;
    kk[z] = k = *c & 31;
    II[z] = I;
    JJ[z] = J;
    ++I;
    ++J;
    ++C[i][j][k];
    --C[i][J][k];
    --C[I][j][k];
    ++C[I][J][k];
  }
  for (k = 0; ++k < 27;)
    for (i = 0; ++i <= x;)
      for (j = z = 0; ++j <= y; C[i][j][0] += z = C[i][j][k] += z)
        C[i + 1][j][k] += C[i][j][k];
  for (i = 0; ++i <= x;)
    for (j = 0; ++j <= y;) {
      D = C[i][j];
      D[M[i][j] & 31] += q - *D;
      for (I = J = k = 0; ++k < 27; J += D[k]) T[k] = I += J;
      I = J = 0;
      for (k = 27; --k; J += D[k], D[k] = z) z = T[k] + (I += J);
      for (*D = D[M[i][j] & 31], k = -1; ++k < 27;)
        C[i][j][k] += C[i][j - 1][k] + C[i - 1][j][k] - C[i - 1][j - 1][k];
    }
  for (z = -1; ++z<q; r = r> t ? t : r) {
    i = ii[z] - 1;
    j = jj[z] - 1;
    k = kk[z];
    I = II[z];
    J = JJ[z];
    t = C[x][y][0];
    t += C[I][J][k] - C[i][J][k] - C[I][j][k] + C[i][j][k];
    t -= C[I][J][0] - C[i][J][0] - C[I][j][0] + C[i][j][0];
  }
  printf("%I64u\n", r);
  return 0;
}
