#include <bits/stdc++.h>
using namespace std;
int main() {
  multiset<int> lenx, leny;
  set<int> nodex, nodey;
  int n, m, k;
  while (cin >> n >> m >> k) {
    char ch;
    int x;
    nodex.insert(0);
    nodey.insert(0);
    nodex.insert(n);
    nodey.insert(m);
    lenx.insert(n);
    leny.insert(m);
    while (k--) {
      scanf(" %c%d", &ch, &x);
      long long q, p;
      if (ch == 'H') {
        multiset<int>::iterator i = nodey.lower_bound(x);
        int r = *(i);
        int l = *(--i);
        i = leny.find(r - l);
        leny.erase(i);
        leny.insert(x - l);
        leny.insert(r - x);
        nodey.insert(x);
      } else {
        multiset<int>::iterator i = nodex.lower_bound(x);
        int r = *(i);
        int l = *(--i);
        i = lenx.find(r - l);
        lenx.erase(i);
        lenx.insert(x - l);
        lenx.insert(r - x);
        nodex.insert(x);
      }
      multiset<int>::iterator it1 = leny.end();
      it1--;
      q = *it1;
      multiset<int>::iterator it2 = lenx.end();
      it2--;
      p = *it2;
      printf("%lld\n", q * p);
    }
  }
}
