#include <bits/stdc++.h>
using namespace std;
int n, m, k;
string s[1111];
int a[311111];
int b[311111];
int c[311111];
int d[311111];
char e[311111];
long long q[1111][26];
long long di[1111][26];
long long odi[1111];
long long Ans[311111];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = 1; i <= k; i++) {
    char E;
    cin >> b[i] >> a[i] >> d[i] >> c[i] >> E;
    e[i] = E - 'a';
  }
  for (int J = 1; J <= m; J++) {
    memset(q, 0, sizeof(q));
    for (int i = 1; i <= k; i++) {
      if (a[i] <= J && J <= c[i]) {
        q[b[i]][e[i]]++;
        q[d[i] + 1][e[i]]--;
      }
    }
    for (int i = 1; i <= n; i++) {
      int cha = s[i - 1][J - 1] - 'a';
      long long tot = 0;
      for (int ch = 0; ch < 26; ch++) {
        q[i][ch] += q[i - 1][ch];
        tot += q[i][ch];
      }
      long long ck = 0, sm = 0;
      for (int ch = 0; ch < 26; ch++) {
        ck += q[i][ch];
        sm += q[i][ch] * ch;
        di[i][ch] = ch * ck - sm + (k - tot) * abs(cha - ch);
      }
      ck = 0, sm = 0;
      for (int ch = 25; ch >= 0; ch--) {
        di[i][ch] += sm - ch * ck;
        ck += q[i][ch];
        sm += q[i][ch] * ch;
      }
      odi[i] = di[i][cha] + odi[i - 1];
      for (int ch = 25; ch >= 0; ch--) {
        di[i][ch] += di[i - 1][ch];
      }
    }
    for (int i = 1; i <= k; i++) {
      if (a[i] <= J && J <= c[i]) {
        Ans[i] += odi[n] - odi[d[i]] + odi[b[i] - 1] + di[d[i]][e[i]] -
                  di[b[i] - 1][e[i]];
      } else {
        Ans[i] += odi[n];
      }
    }
  }
  long long A = 1000000000000000000LL;
  for (int i = 1; i <= k; i++) {
    A = min(A, Ans[i]);
  }
  cout << A << endl;
  return 0;
}
