#include <bits/stdc++.h>
using namespace std;
set<int> H[2];
multiset<int> hans[2];
int main() {
  int n, m, k;
  scanf("%d%d%d", &m, &n, &k);
  hans[0].insert(n);
  hans[1].insert(m);
  char op[5];
  H[0].insert(0);
  H[0].insert(n);
  H[1].insert(0);
  H[1].insert(m);
  int pos;
  set<int>::iterator it;
  set<int>::iterator it2;
  int l, r;
  for (int i = 1; i <= k; i++) {
    scanf("%s%d", op, &pos);
    int s = (op[0] != 'H');
    it = H[s].lower_bound(pos);
    r = *it;
    it--;
    l = *it;
    hans[s].erase(hans[s].find(r - l));
    hans[s].insert(pos - l);
    hans[s].insert(r - pos);
    H[s].insert(pos);
    it = hans[0].end();
    it--;
    it2 = hans[1].end();
    it2--;
    printf("%I64d\n", (long long)(*it) * (*it2));
  }
}
