#include <bits/stdc++.h>
using namespace std;
struct segment {
  int sz, p;
};
vector<pair<char, int>> a;
vector<int> b[2];
long long ans[2];
int n, w, h, x, pr;
char z;
int which[2][200100];
vector<segment> segm[2];
vector<long long> v_ans;
int get(int q, int k) {
  return segm[k][q].p == q ? q : segm[k][q].p = get(segm[k][q].p, k);
}
long long max(long long a, int b) { return max(a, (long long)b); }
int unite(int q, int e, int k) {
  q = get(q, k);
  e = get(e, k);
  if (segm[k][q].sz < segm[k][e].sz) swap(q, e);
  segm[k][e].p = q;
  return segm[k][q].sz += segm[k][e].sz;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> w >> h >> n;
  for (int i = 0; i < n; i++) {
    cin >> z >> x;
    a.push_back({z, x});
    b[z == 'V'].push_back(x);
  }
  sort(b[0].begin(), b[0].end());
  sort(b[1].begin(), b[1].end());
  b[0].push_back(h);
  b[1].push_back(w);
  for (int k = 0; k < 2; k++) {
    pr = 0;
    for (auto it = b[k].begin(); it != b[k].end(); it++) {
      which[k][*it] = segm[k].size();
      segm[k].push_back({*it - pr, int(segm[k].size())});
      ans[k] = max(ans[k], *it - pr);
      pr = *it;
    }
  }
  for (auto it = a.rbegin(); it != a.rend(); it++) {
    v_ans.push_back(ans[0] * ans[1]);
    int k = (it->first == 'V');
    x = it->second;
    ans[k] = max(ans[k], unite(which[k][x], which[k][x] + 1, k));
  }
  for (auto it = v_ans.rbegin(); it != v_ans.rend(); it++) cout << *it << endl;
  return 0;
}
