#include <bits/stdc++.h>
using namespace std;
const int N = -1;
const int INF = 1e9;
struct split {
  int x, t, id;
  split() {}
  split(int x, int t, int id) : x(x), t(t), id(id) {}
};
int w, h, n;
vector<pair<int, int> > a;
vector<pair<int, int> > b;
void read() {
  scanf("%d%d%d ", &w, &h, &n);
  for (int i = 0; i < n; i++) {
    char ch;
    int x;
    scanf(" %c %d", &ch, &x);
    assert(ch == 'H' || ch == 'V');
    if (ch == 'H') {
      a.push_back(make_pair(x, i));
    } else {
      b.push_back(make_pair(x, i));
    }
  }
}
vector<int> p;
vector<int> len;
int getId(int v) { return (p[v] == v) ? v : p[v] = getId(p[v]); }
void merge(int v, int u) {
  v = getId(v);
  u = getId(u);
  if (v != u) {
    p[v] = u;
    len[u] += len[v];
  }
}
vector<int> f(vector<pair<int, int> > a, int h) {
  a.push_back(make_pair(h, INF));
  sort(a.begin(), a.end());
  p.resize(a.size());
  len.resize(a.size());
  for (int i = 0; i < (int)p.size(); i++) p[i] = i;
  int last = 0;
  vector<pair<int, int> > e;
  int mx = 0;
  for (int i = 0; i < (int)a.size(); i++) {
    len[i] = a[i].first - last;
    last = a[i].first;
    mx = max(mx, len[i]);
    if (a[i].second < INF) e.push_back(make_pair(a[i].second, i));
  }
  int mx0 = mx;
  sort(e.begin(), e.end(), greater<pair<int, int> >());
  vector<int> res(n);
  for (int i = 0; i < (int)e.size(); i++) {
    int v = e[i].second;
    int u = e[i].second + 1;
    merge(v, u);
    v = getId(v);
    mx = max(mx, len[v]);
    res[e[i].first] = mx;
  }
  res.push_back(mx0);
  for (int i = (int)res.size() - 1; i >= 0; i--) {
    mx0 = max(mx0, res[i]);
    res[i] = mx0;
  }
  return res;
}
void solve() {
  auto r1 = f(a, h);
  auto r2 = f(b, w);
  assert((int)r1.size() == n + 1);
  assert((int)r2.size() == n + 1);
  for (int i = 1; i <= n; i++) cout << r1[i] * 1ll * r2[i] << "\n";
}
void printAns() {}
void stress() {}
int main() {
  if (1) {
    while (true) {
      read();
      solve();
      printAns();
      return 0;
    }
  } else {
    stress();
  }
  return 0;
}
