#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-10;
template <typename T, typename S>
vector<T>& operator<<(vector<T>& a, S b) {
  a.push_back(b);
  return a;
}
template <typename T>
void operator>>(vector<T>& a, int b) {
  while (b--)
    if (!a.empty()) a.pop_back();
}
bool isprime(int n) {
  if (n < 2) return false;
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) return false;
  return true;
}
long long b_pow(long long x, long long n) {
  return n ? b_pow(x * x, n / 2) * (n % 2 ? x : 1) : 1ll;
}
string itos(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
vector<long long> f(vector<pair<long long, long long> > query, long long l) {
  priority_queue<pair<long long, pair<long long, long long> > > Q;
  set<pair<long long, long long> > V;
  V.insert({0, l});
  Q.push({l, {0, l}});
  vector<long long> res;
  for (long long i = 0; i < query.size(); i++) {
    if (query[i].first == 1) {
      long long x = query[i].second;
      auto p = *(--V.lower_bound(make_pair(x, 1e9)));
      V.erase(p);
      V.insert({p.first, x});
      V.insert({x, p.second});
      Q.push({x - p.first, {p.first, x}});
      Q.push({p.second - x, {x, p.second}});
    }
    while (!V.count(Q.top().second)) {
      Q.pop();
    }
    res.push_back(Q.top().first);
  }
  return res;
}
signed main() {
  long long n, w, h;
  cin >> w >> h >> n;
  vector<pair<long long, long long> > v1(n), v2(n);
  for (long long i = 0; i < n; i++) {
    char c;
    long long x;
    cin >> c >> x;
    if (c == 'H') v1[i] = {1, x};
    if (c == 'V') v2[i] = {1, x};
  }
  vector<long long> c1 = f(v1, h);
  vector<long long> c2 = f(v2, w);
  for (long long i = 0; i < n; i++) cout << c1[i] * c2[i] << endl;
}
