#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,O3,unroll-loops")
using namespace std;
using ll = long long;
template <typename A, typename B>
ostream &operator<<(ostream &out, pair<A, B> p) {
  return out << '(' << p.first << ", " << p.second << ')';
}
template <typename A,
          typename B = typename enable_if<!is_same<A, string>::value,
                                          typename A::value_type>::type>
ostream &operator<<(ostream &out, A vector) {
  out << '{';
  string sep;
  for (B x : vector) out << sep << x, sep = ", ";
  return out << '}';
}
void dbg_print() { cerr << endl; }
template <typename A, typename... B>
void dbg_print(A a, B... b) {
  cerr << ' ' << a;
  dbg_print(b...);
}
inline char get_char() {
  char c;
  cin >> c;
  return c;
}
inline void init(vector<vector<array<ll, 26>>> &pref) {
  for (ll i = 1; i < ((ll)((pref).size())); i++) {
    for (ll j = 1; j < ((ll)((pref[i]).size())); j++) {
      for (ll k = 0; k < 26; k++) {
        pref[i][j][k] +=
            pref[i - 1][j][k] + pref[i][j - 1][k] - pref[i - 1][j - 1][k];
      }
    }
  }
}
inline void reset(vector<vector<array<ll, 26>>> &pref) {
  for (auto &xss : pref) {
    for (auto &xs : xss) {
      for (auto &x : xs) {
        x = 0;
      }
    }
  }
}
inline ll get_cnt(vector<vector<array<ll, 26>>> &pref, ll l1, ll r1, ll l2,
                  ll r2, ll who) {
  return pref[l2 + 1][r2 + 1][who] - pref[l2 + 1][r1][who] -
         pref[l1][r2 + 1][who] + pref[l1][r1][who];
}
signed main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  ll n, m, nq;
  cin >> n >> m >> nq;
  vector<vector<pair<ll, ll>>> poses(26);
  vector<vector<array<ll, 26>>> pref(
      n + 2, vector<array<ll, 26>>(m + 2, array<ll, 26>()));
  vector<vector<ll>> grid(n, vector<ll>(m));
  for (ll i = 0; i < n; i++) {
    for (ll j = 0; j < m; j++) {
      ll c = get_char() - 'a';
      poses[c].emplace_back(i, j);
      pref[i + 1][j + 1][c]++;
      grid[i][j] = c;
    }
  }
  init(pref);
  vector<ll> start_cost(nq);
  vector<array<ll, 5>> queries;
  for (ll i = 0; i < nq; i++) {
    ll l1, r1, l2, r2;
    cin >> l1 >> r1 >> l2 >> r2, l1--, r1--, l2--, r2--;
    ll c = get_char() - 'a';
    for (ll k = 0; k < 26; k++) {
      start_cost[i] += get_cnt(pref, l1, r1, l2, r2, k) * abs(k - c);
    }
    queries.push_back({l1, r1, l2, r2, c});
  }
  reset(pref);
  for (ll i = 0; i < nq; i++) {
    auto [l1, r1, l2, r2, c] = queries[i];
    pref[l1 + 1][r1 + 1][c]++;
    pref[l2 + 2][r1 + 1][c]--;
    pref[l1 + 1][r2 + 2][c]--;
    pref[l2 + 2][r2 + 2][c]++;
  }
  init(pref);
  vector<ll> to_sub(nq);
  for (ll i = 0; i < nq; i++) {
    to_sub[i] = -ll(nq) * start_cost[i];
  }
  vector<vector<array<ll, 26>>> want(
      n + 1, vector<array<ll, 26>>(m + 1, array<ll, 26>()));
  for (ll i = 0; i < n; i++) {
    for (ll j = 0; j < m; j++) {
      for (ll k = 0; k < 26; k++) {
        want[i + 1][j + 1][k] = get_cnt(pref, 0, 0, i, j, k);
      }
    }
  }
  init(want);
  for (ll i = 0; i < nq; i++) {
    auto [l1, r1, l2, r2, c] = queries[i];
    for (ll k = 0; k < 26; k++) {
      to_sub[i] -= abs(k - c) * get_cnt(want, l1, r1, l2, r2, k);
    }
  }
  reset(want);
  for (ll i = 0; i < n; i++) {
    for (ll j = 0; j < m; j++) {
      for (ll k = 0; k < 26; k++) {
        want[i + 1][j + 1][k] =
            get_cnt(pref, 0, 0, i, j, k) * abs(k - grid[i][j]);
      }
    }
  }
  init(want);
  for (ll i = 0; i < nq; i++) {
    auto [l1, r1, l2, r2, c] = queries[i];
    for (ll k = 0; k < 26; k++) {
      to_sub[i] += get_cnt(want, l1, r1, l2, r2, k);
    }
  }
  reset(want);
  for (ll i = 0; i < n; i++) {
    for (ll j = 0; j < m; j++) {
      for (ll k = 0; k < 26; k++) {
        want[i + 1][j + 1][grid[i][j]] += get_cnt(pref, 0, 0, i, j, k);
      }
    }
  }
  init(want);
  for (ll i = 0; i < nq; i++) {
    auto [l1, r1, l2, r2, c] = queries[i];
    for (ll k = 0; k < 26; k++) {
      to_sub[i] += get_cnt(want, l1, r1, l2, r2, k) * abs(k - c);
    }
  }
  cout << accumulate(begin(start_cost), end(start_cost), 0ll) -
              *max_element(begin(to_sub), end(to_sub))
       << '\n';
}
