Berhattan is the capital of Berland. There are n streets running parallel in the east-west direction (horizontally), and there are m avenues running parallel in the south-north direction (vertically). Each street intersects with each avenue, forming a crossroad. So in total there are n ⋅ m crossroads in Berhattan.

Recently, the government has changed in Berland. The new government wants to name all avenues and all streets after heroes of revolution.

The special committee prepared the list of k names. Only these names can be used as new names for streets and avenues. Each name can be used at most once.

The members of committee want to name streets and avenues in the way that minimizes inconvenience for residents. They believe that if street and avenue names start with the same letter, then their crossroad will be inconvenient. Hence only the first letter of each name matters.

Given first letters of k names, find C — minimal possible number of inconvenient crossroads in Berhattan after the naming process.

Input

Input contains one or several test cases to process. The first line contains t (1 ≤ t ≤ 30000) — the number of test cases. Solve test cases separately, test cases are completely independent and do not affect each other.

The description of t test cases follows. Each test case starts with line with space-separated numbers n, m, k (1 ≤ n,m ≤ 30000; n+m ≤ k ≤ 2⋅10^5) — the number of streets, number of avenues and the number of names in the committee's list, respectively.

The the second line of each test case contains a string of k uppercase English letters. i-th letter of the string is the first letter of i-th name from the committee's list. 

It's guaranteed that the sum of numbers n from all test cases is not greater than 30000. Similarly, the sum of numbers m from all test cases is not greater than 30000. The sum of numbers k from all test cases is not greater than 2⋅10^5.

Output

For each test case print single number C in the separate line — minimal possible number of inconvenient crossroads in Berhattan after the naming process.

Examples

Input

2
2 3 9
EEZZEEZZZ
2 7 9
EEZZEEZZZ


Output

0
4


Input

2
4 4 8
CZBBCZBC
1 1 4
TTCT


Output

1
0
#include <bits/stdc++.h>
using namespace std;
int n, m, k;
string s;
bool can[303030][30];
int am[256];
long long ans;
void check(int j, int i) {
  if (i >= n && j <= k - m) {
    if (n - j <= 0 || (m - (k - i)) <= 0)
      ans = 0;
    else
      ans = min(ans, (long long)(n - j) * (m - (k - i)));
  }
}
void solve() {
  for (int i = 0; i <= s.size(); ++i)
    for (int c = 0; c <= 'Z' - 'A'; ++c) can[i][c] = 0;
  for (int i = 0; i <= 'Z' - 'A'; ++i) am[i] = 0;
  for (int i = 0; i < s.size(); ++i) ++am[s[i] - 'A'];
  ans = 1e15;
  for (int c = 0; c <= 'Z' - 'A'; ++c) {
    if (!am[c]) continue;
    for (int i = s.size(); i >= am[c] + 1; --i) {
      for (int g = 0; g < c; ++g) {
        if (!am[g]) continue;
        if (can[i - am[c]][g]) {
          can[i][c] = 1;
          can[i][g] = 1;
          check(i - am[g], i);
        }
      }
      if (can[i][c]) check(i - am[c], i);
    }
    can[am[c]][c] = 1;
    check(0, am[c]);
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  for (int ii = 0; ii < t; ++ii) {
    cin >> n >> m >> k;
    cin >> s;
    solve();
    cout << ans << "\n";
  }
}
