#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
long long res[MAXN];
bool type[MAXN];
int val[MAXN];
set<int> X;
set<int> Y;
int get_max(set<int> &V) {
  int len = 0;
  set<int>::iterator act = V.begin();
  set<int>::iterator prev = act++;
  for (; act != V.end(); act++) {
    len = max(len, *act - *prev);
    prev = act;
  }
  return len;
}
int rem(set<int> &V, int v) {
  set<int>::iterator it = V.find(v);
  set<int>::iterator tmp = it;
  tmp--;
  V.erase(it);
  it = tmp;
  tmp++;
  return *tmp - *it;
}
int main() {
  char ch;
  int v;
  int W, H, N;
  scanf("%d %d %d", &W, &H, &N);
  X.insert(0);
  X.insert(W);
  Y.insert(0);
  Y.insert(H);
  for (int i = 0; i < N; ++i) {
    scanf(" %c %d", &ch, &v);
    if (ch == 'H') {
      Y.insert(v);
      type[i] = true;
      val[i] = v;
    } else {
      X.insert(v);
      type[i] = false;
      val[i] = v;
    }
  }
  int maxX = get_max(X);
  int maxY = get_max(Y);
  res[N - 1] = 1LL * maxX * maxY;
  for (int i = N - 1; i > 0; i--) {
    if (type[i]) {
      maxY = max(maxY, rem(Y, val[i]));
      res[i - 1] = max(res[i], 1LL * maxX * maxY);
    } else {
      maxX = max(maxX, rem(X, val[i]));
      res[i - 1] = max(res[i], 1LL * maxX * maxY);
    }
  }
  for (int i = 0; i < N; ++i) printf("%I64d\n", res[i]);
  return 0;
}
