#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
} a[200005];
int c[200005], f[2][200005], g[200005], q[2][200005], w, h, n, p;
int getf(int x) {
  if (g[x] == x)
    return x;
  else
    return g[x] = getf(g[x]);
}
void work(int x, int y) {
  x = getf(x);
  y = getf(y);
  if (x == y) return;
  c[y] += c[x];
  g[x] = y;
  p = max(p, c[y]);
}
int main() {
  int i;
  scanf("%d%d%d", &w, &h, &n);
  for (i = 1; i <= n; i++) {
    char c;
    cin >> c;
    if (c == 'H') a[i].y = 1;
    scanf("%d", &a[i].x);
    f[a[i].y][a[i].x] = 1;
  }
  for (i = 1; i <= max(w, h); i++) {
    c[i] = 1;
    g[i] = i;
  }
  p = 1;
  for (i = 1; i < w; i++) {
    if (!f[0][i]) work(i, i + 1);
  }
  for (i = n; i >= 1; i--) {
    q[0][i] = p;
    if (a[i].y == 0) work(a[i].x, a[i].x + 1);
  }
  for (i = 1; i <= max(w, h); i++) {
    c[i] = 1;
    g[i] = i;
  }
  p = 1;
  for (i = 1; i < h; i++) {
    if (!f[1][i]) work(i, i + 1);
  }
  for (i = n; i >= 1; i--) {
    q[1][i] = p;
    if (a[i].y == 1) work(a[i].x, a[i].x + 1);
  }
  for (i = 1; i <= n; i++)
    printf("%I64d\n", (long long)q[0][i] * (long long)q[1][i]);
  return 0;
}
