#include <bits/stdc++.h>
using namespace std;
void rs(int &x) { scanf("%d", &x); }
void rsl(long long &x) { scanf("%I64d", &x); }
void rsd(double &x) { scanf("%lf", &x); }
void rss(char *str) { scanf("%s", str); }
void ws(int &x) { printf("%d ", x); }
void wsl(long long &x) { printf("%I64d ", x); }
void wsd(double &x) { printf("%lf ", x); }
void wss(char *str) { printf("%s ", str); }
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int const N = (3e5) + 5;
int const mod = (1e9) + 7;
char t[1005][1005];
int up[N], bo[N], le[N], ra[N];
char sy[N];
long long srof[1005][1005][27];
long long dist_pat[1005][1005];
int main() {
  int n, m, kk;
  cin >> n >> m >> kk;
  for (int i = 1; i <= n; ++i) {
    scanf("%s", t[i] + 1);
  }
  for (int i = 0; i < kk; ++i) {
    scanf("%d %d %d %d", &up[i], &le[i], &bo[i], &ra[i]);
    scanf("%s", &sy[i]);
    srof[up[i]][le[i]][sy[i] - 'a']++;
    srof[up[i]][ra[i] + 1][sy[i] - 'a']--;
    srof[bo[i] + 1][le[i]][sy[i] - 'a']--;
    srof[bo[i] + 1][ra[i] + 1][sy[i] - 'a']++;
  }
  for (int i = 0; i < 26; ++i) {
    for (int j = 1; j <= n; ++j) {
      for (int k = 1; k <= m; ++k) {
        srof[j][k][i] += srof[j][k - 1][i];
      }
    }
    for (int j = 1; j <= n; ++j) {
      for (int k = 1; k <= m; ++k) {
        srof[j][k][i] += srof[j - 1][k][i];
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      for (int k = 0; k < 26; ++k) {
        dist_pat[i][j] += srof[i][j][k] * abs(t[i][j] - 'a' - k);
      }
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      int ss = 0;
      for (int k = 0; k < 26; ++k) {
        ss += srof[i][j][k];
      }
      srof[i][j][t[i][j] - 'a'] += kk - ss;
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      dist_pat[i][j] +=
          dist_pat[i][j - 1] + dist_pat[i - 1][j] - dist_pat[i - 1][j - 1];
      for (int k = 0; k < 26; ++k) {
        srof[i][j][k] +=
            srof[i][j - 1][k] + srof[i - 1][j][k] - srof[i - 1][j - 1][k];
      }
    }
  }
  long long ans = 27ll * m * n * kk;
  for (int i = 0; i < kk; ++i) {
    int xu = up[i], xb = bo[i], yl = le[i], yr = ra[i];
    long long rec = dist_pat[xb][yr] - dist_pat[xb][yl - 1] -
                    dist_pat[xu - 1][yr] + dist_pat[xu - 1][yl - 1];
    long long wrec = dist_pat[n][m] - rec;
    long long cans = 0;
    for (int j = 0; j < 26; ++j) {
      long long alrec = srof[xb][yr][j] - srof[xb][yl - 1][j] -
                        srof[xu - 1][yr][j] + srof[xu - 1][yl - 1][j];
      cans += alrec * abs(sy[i] - 'a' - j);
    }
    ans = min(ans, cans + wrec);
  }
  cout << ans;
  return 0;
}
