#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long w, h, n;
  cin >> w >> h >> n;
  long long i, j;
  set<long long> l1, l2;
  multiset<long long> cnt1, cnt2;
  l1.insert(0);
  l1.insert(w);
  l2.insert(0);
  l2.insert(h);
  cnt1.insert(w);
  cnt2.insert(h);
  for (i = 0; i < n; i++) {
    char ch;
    cin >> ch;
    if (ch == 'H') {
      long long t;
      cin >> t;
      auto it = l2.lower_bound(t);
      long long r = *it;
      it--;
      long long l = *it;
      auto it2 = cnt2.lower_bound(r - l);
      cnt2.erase(it2);
      cnt2.insert(r - t);
      cnt2.insert(t - l);
      l2.insert(t);
      long long val = (*(cnt1.rbegin()));
      val *= (*(cnt2.rbegin()));
      cout << val << endl;
    } else {
      long long t;
      cin >> t;
      auto it = l1.lower_bound(t);
      long long r = *it;
      it--;
      long long l = *it;
      auto it2 = cnt1.lower_bound(r - l);
      cnt1.erase(it2);
      cnt1.insert(r - t);
      cnt1.insert(t - l);
      l1.insert(t);
      long long val = (*(cnt1.rbegin()));
      val *= (*(cnt2.rbegin()));
      cout << val << endl;
    }
  }
  return 0;
}
