#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
struct V {
  vector<int> cnt;
  int idx;
  V(int w) : cnt(MAXN) {
    cnt[w] = 1;
    idx = w;
  }
  int max() {
    while (cnt[idx] == 0) idx--;
    return idx;
  }
  void split(int v, int l1) {
    cnt[v]--;
    cnt[l1]++;
    cnt[v - l1]++;
  }
};
int main() {
  ios::sync_with_stdio(false);
  int w, h, n;
  cin >> w >> h >> n;
  set<int> cuts_h, cuts_w;
  cuts_h.insert(0);
  cuts_w.insert(0);
  cuts_h.insert(h);
  cuts_w.insert(w);
  V vh(h), vw(w);
  for (int i = 0; i < n; i++) {
    char c;
    int x;
    cin >> c >> x;
    V& v = (c == 'H') ? vh : vw;
    set<int>& cuts = (c == 'H') ? cuts_h : cuts_w;
    auto next = cuts.lower_bound(x);
    auto it = next;
    --it;
    v.split(*next - *it, x - *it);
    cuts.insert(x);
    cout << (vh.max() * (long long)(vw.max())) << '\n';
  }
  return 0;
}
