#include <bits/stdc++.h>
using namespace std;
multiset<long long> l1, l2, v1, v2;
long long n, m, Q;
signed main() {
  scanf("%lld%lld%lld", &n, &m, &Q);
  l1.insert(0);
  l1.insert(m);
  l2.insert(0);
  l2.insert(n);
  v1.insert(m);
  v2.insert(n);
  while (Q--) {
    char op;
    long long x;
    cin >> op >> x;
    if (op == 'H') {
      l1.insert(x);
      multiset<long long>::iterator it = l1.find(x);
      multiset<long long>::iterator L = it, R = it;
      --L;
      ++R;
      long long t1 = *R - x, t2 = x - *L, t3 = *R - *L;
      v1.erase(v1.find(t3));
      v1.insert(t1);
      v1.insert(t2);
      long long a = *(--v1.end()), b = *(--v2.end());
      printf("%lld\n", a * b);
    } else {
      l2.insert(x);
      multiset<long long>::iterator it = l2.find(x);
      multiset<long long>::iterator L = it, R = it;
      --L;
      ++R;
      long long t1 = *R - x, t2 = x - *L, t3 = *R - *L;
      v2.erase(v2.find(t3));
      v2.insert(t1);
      v2.insert(t2);
      long long a = *(--v1.end()), b = *(--v2.end());
      printf("%lld\n", a * b);
    }
  }
  return 0;
}
