#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
  int diff;
  int sz;
  node *l, *r;
  node() {}
  node(int _x) {
    x = _x;
    diff = 0;
    sz = 0;
    y = rand();
    l = r = 0;
  }
};
typedef node *tree;
set<int> hs, ansdasnf;
tree ho, wi;
void show(tree t) {
  if (!t) return;
  show(t->l);
  printf("%d ", t->x);
  show(t->r);
}
void update(tree &t) {
  if (!t) return;
  t->sz = 1;
  if (t->l) t->sz += t->l->sz;
  if (t->r) t->sz += t->r->sz;
}
void merge(tree l, tree r, tree &t) {
  if (l == 0 || r == 0)
    t = l ? l : r;
  else if (l->y > r->y)
    merge(l->r, r, l->r), t = l;
  else
    merge(l, r->l, r->l), t = r;
  update(t);
}
void split(tree t, int x, tree &l, tree &r) {
  if (!t)
    l = r = 0;
  else if (t->x > x)
    split(t->l, x, l, t->l), r = t;
  else
    split(t->r, x, t->r, r), l = t;
  update(l);
  update(r);
}
void splitSize(tree t, int x, tree &l, tree &r) {
  if (!t) {
    l = r = 0;
    return;
  }
  int sz = 1;
  if (t->l) sz += t->l->sz;
  if (sz > x)
    splitSize(t->l, x, l, t->l), r = t;
  else
    splitSize(t->r, x - sz, t->r, r), l = t;
  update(l);
  update(r);
}
void add(int x, tree &t) {
  tree l, r, m;
  m = new node(x);
  split(t, x, l, r);
  merge(l, m, l);
  merge(l, r, t);
}
void deleteone(tree &t) {
  if (!t) return;
  tree tmp = t;
  if (t->l) {
    while (tmp->l->l) {
      tmp = tmp->l;
    }
    tmp->l = 0;
  } else if (t->r) {
    while (tmp->r->r) {
      tmp = tmp->r;
    }
    tmp->r = 0;
  } else {
    t = 0;
  }
}
void erase(int x, tree &t) {
  tree l, r, m, tmp;
  split(t, x, l, r);
  split(l, x - 1, l, m);
  splitSize(m, 1, tmp, m);
  merge(l, m, l);
  merge(l, r, t);
}
int get_max(tree t) {
  if (!t) return -1;
  if (!(t->r))
    return t->x;
  else
    return get_max(t->r);
}
int h, w, n, x;
char c;
int main() {
  scanf("%d%d%d", &w, &h, &n);
  add(h, ho);
  add(w, wi);
  hs.insert(0);
  hs.insert(h);
  ansdasnf.insert(0);
  ansdasnf.insert(w);
  while (n-- > 0) {
    cin >> c;
    scanf("%d", &x);
    set<int>::iterator it;
    int lllleft, rrrright;
    if (c == 'H') {
      hs.insert(x);
      it = hs.find(x);
      it--;
      lllleft = *it;
      it++;
      it++;
      rrrright = *it;
      erase(rrrright - lllleft, ho);
      add(x - lllleft, ho);
      add(rrrright - x, ho);
      long long ans = 1LL * get_max(ho) * get_max(wi);
      printf("%I64d\n", ans);
    } else {
      ansdasnf.insert(x);
      it = ansdasnf.find(x);
      it--;
      lllleft = *it;
      it++;
      it++;
      rrrright = *it;
      erase(rrrright - lllleft, wi);
      add(x - lllleft, wi);
      add(rrrright - x, wi);
      long long ans = 1LL * get_max(ho) * get_max(wi);
      printf("%I64d\n", ans);
    }
  }
  return 0;
}
