#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > x, y;
multiset<int> lx, ly;
int main() {
  long long w, h;
  scanf("%I64d%I64d", &w, &h);
  int n;
  scanf("%d", &n);
  x.insert(make_pair(0, w));
  y.insert(make_pair(0, h));
  lx.insert(-w);
  ly.insert(-h);
  for (int i = 0; i < n; i++) {
    char c;
    int v;
    cin >> c >> v;
    if (c == 'H') {
      set<pair<int, int> >::iterator cur = y.lower_bound(make_pair(v, 1));
      cur--;
      int l, r;
      l = cur->first;
      r = cur->second;
      y.erase(*cur);
      y.insert(make_pair(l, v));
      y.insert(make_pair(v, r));
      multiset<int>::iterator it = ly.find(-(r - l));
      ly.erase(it);
      ly.insert(-(v - l));
      ly.insert(-(r - v));
    } else {
      set<pair<int, int> >::iterator cur = x.lower_bound(make_pair(v, 1));
      cur--;
      int l, r;
      l = cur->first;
      r = cur->second;
      x.erase(*cur);
      x.insert(make_pair(l, v));
      x.insert(make_pair(v, r));
      multiset<int>::iterator it = lx.find(-(r - l));
      lx.erase(it);
      lx.insert(-(v - l));
      lx.insert(-(r - v));
    }
    long long res = 1LL * (*lx.begin()) * (*ly.begin());
    printf("%I64d\n", res);
  }
  return 0;
}
