Dasha decided to have a rest after solving the problem D and began to look photos from previous competitions.

Let's call photos as the matrix with the size n × m, which consists of lowercase English letters.

Some k photos especially interested her, because they can be received from photo-template by painting a rectangular area in a certain color. Let's call such photos special. 

<image>

More formally the i-th special photo is received from the photo-template by replacing all characters on some rectangle with upper left corner of the cell with coordinates (ai, bi) and lower right corner in the cell with coordinates (ci, di) to the symbol ei.

Dasha asks you to find the special photo so that the total distance from it to all other special photos is minimum. And calculate this distance.

Determine the distance between two photos as the sum of distances between all corresponding letters. The distance between two letters is the difference module of their positions in the alphabet. For example, the distance between letters 'h' and 'm' equals |8 - 13| = 5, because the letter 'h' is the 8-th in the alphabet, the letter 'm' is the 13-th.

Input

The first line contains three integers n, m, k (1 ≤ n, m ≤ 103, 1 ≤ k ≤ 3·105) — the number of strings in the photo-template, the number of columns and the number of special photos which are interesting for Dasha. 

The next n lines contains the string with m length which consists of little Latin characters — the description of the photo-template.

Each of the next k lines contains the description of the special photo in the following format, "ai bi ci di ei" (1 ≤ ai ≤ ci ≤ n, 1 ≤ bi ≤ di ≤ m), where (ai, bi) — is the coordinate of the upper left corner of the rectangle, (ci, di) — is the description of the lower right corner, and ei — is the little Latin letter which replaces the photo-template in the described rectangle. 

Output

In the only line print the minimum total distance from the found special photo to all other special photos.

Examples

Input

3 3 2
aaa
aaa
aaa
1 1 2 2 b
2 2 3 3 c


Output

10


Input

5 5 3
abcde
eabcd
deabc
cdeab
bcdea
1 1 3 4 f
1 2 3 3 e
1 3 3 4 i


Output

59

Note

In the first example the photos are following: 
    
    
      
    bba    aaa  
    bba    acc  
    aaa    acc  
    

The distance between them is 10.
#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 10, MN = 1e3 + 5, MK = 3e5 + 5;
long long D[MK];
string s[MN];
int n, m, k;
struct trip {
  int a, b, c, d, ch;
} rec[MK];
struct mat {
  long long A[1005][1005];
  mat() { memset(A, 0, sizeof A); }
  void clear() { memset(A, 0, sizeof A); }
  void P() {
    for (int i = 0; i < MN; ++i)
      for (int j = 0; j < MN; ++j) {
        if (i) A[i][j] += A[i - 1][j];
        if (j) A[i][j] += A[i][j - 1];
        if (i && j) A[i][j] -= A[i - 1][j - 1];
      }
  }
  void Add(const trip &T) {
    int a = T.a, b = T.b, c = T.c, d = T.d;
    ++A[a][b], --A[a][d + 1], --A[c + 1][b], ++A[c + 1][d + 1];
  }
  long long get(const trip &T) {
    int a = T.a, b = T.b, c = T.c, d = T.d;
    long long ret = A[c][d];
    if (b) ret -= A[c][b - 1];
    if (a) ret -= A[a - 1][d];
    if (a && b) ret += A[a - 1][b - 1];
    return ret;
  }
  void print() {
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) cout << A[i][j] << ' ';
      cout << endl;
    }
  }
} Cnt[26], my;
void solve() {
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < m; ++j) Cnt[s[i][j] - 'a'].A[i][j]++;
  for (int i = 0; i < 26; ++i) Cnt[i].P();
  long long sm = 0;
  for (int i = 0; i < k; ++i) {
    for (int c = 0; c < 26; ++c)
      D[i] += 1ll * abs(rec[i].ch - c) * Cnt[c].get(rec[i]);
    sm += D[i];
  }
  for (int i = 0; i < k; ++i) D[i] = D[i] * k + sm;
  for (int i = 0; i < 26; ++i) Cnt[i].clear();
  for (int i = 0; i < k; ++i) my.Add(rec[i]);
  my.P();
  for (int r = 0; r < n; ++r)
    for (int c = 0; c < m; ++c) Cnt[s[r][c] - 'a'].A[r][c] = my.A[r][c];
  for (int i = 0; i < 26; ++i) Cnt[i].P();
  for (int i = 0; i < k; ++i)
    for (int c = 0; c < 26; ++c)
      D[i] -= 1ll * abs(rec[i].ch - c) * Cnt[c].get(rec[i]);
  my.clear();
  for (int i = 0; i < 26; ++i) Cnt[i].clear();
  for (int i = 0; i < k; ++i) Cnt[rec[i].ch].Add(rec[i]);
  for (int i = 0; i < 26; ++i) {
    Cnt[i].P();
    for (int r = 0; r < n; ++r)
      for (int c = 0; c < m; ++c)
        my.A[r][c] += 1ll * abs(s[r][c] - 'a' - i) * Cnt[i].A[r][c];
  }
  my.P();
  for (int i = 0; i < k; ++i) D[i] -= my.get(rec[i]);
  for (int i = 0; i < 26; ++i) Cnt[i].P();
  for (int i = 0; i < k; ++i)
    for (int c = 0; c < 26; ++c)
      D[i] += 1ll * abs(rec[i].ch - c) * Cnt[c].get(rec[i]);
}
int main() {
  ios_base ::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m >> k;
  for (int i = 0; i < n; ++i) cin >> s[i];
  for (int i = 0; i < k; ++i) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    --a, --b, --c, --d;
    char ch;
    cin >> ch;
    rec[i] = {a, b, c, d, ch - 'a'};
  }
  solve();
  cout << *min_element(D, D + k) << '\n';
  return 0;
}
