#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
const int MX = 2e5;
int ah[MX + 1];
int av[MX + 1];
pair<bool, int> qs[MX];
void debug_print(int a[], int n) {
  for (int(i) = 0; (i) < n; ++(i)) cout << a[i] << ' ';
  cout << endl;
}
class dsu {
  int* parent;
  int* rank;

 public:
  int make_set(int a[], int n, int na) {
    parent = new int[MX];
    rank = new int[MX];
    int j = 0;
    int s = 0;
    int mx = 0;
    for (int i = 0; i < n; ++i) {
      if (i >= a[j]) {
        mx = max(mx, i - s);
        j++;
        s = i;
      }
      parent[i] = s;
      rank[i] = a[j] - s;
    }
    return max(mx, n - s);
  }
  int find_set(int v) {
    if (v == parent[v]) return v;
    return parent[v] = find_set(parent[v]);
  }
  int union_sets(int a, int b) {
    a = find_set(a);
    b = find_set(b);
    if (a != b) {
      if (rank[a] < rank[b]) swap(a, b);
      parent[b] = a;
      rank[a] += rank[b];
    }
    return rank[a];
  }
  ~dsu() {
    delete[] parent;
    delete[] rank;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  int w, h, n, size_h = 0, size_v = 0;
  cin >> w >> h >> n;
  for (int i = 0; i < n; ++i) {
    char c;
    int a;
    bool isVert;
    cin.get();
    cin >> c >> a;
    if (c == 'H') {
      isVert = false;
      ah[size_h++] = a;
    } else {
      isVert = true;
      av[size_v++] = a;
    }
    qs[i] = make_pair(isVert, a);
  }
  sort(ah, ah + size_h);
  ah[size_h++] = h;
  sort(av, av + size_v);
  av[size_v++] = w;
  dsu vert, horiz;
  int mx_v = vert.make_set(av, w, size_v);
  int mx_h = horiz.make_set(ah, h, size_h);
  vector<long long> ans;
  ans.push_back((long long)mx_v * mx_h);
  for (int i = n - 1; i >= 1; --i) {
    int l = qs[i].second;
    bool v = qs[i].first;
    if (v) {
      mx_v = max(mx_v, vert.union_sets(l - 1, l));
    } else {
      mx_h = max(mx_h, horiz.union_sets(l - 1, l));
    }
    ans.push_back((long long)mx_h * mx_v);
  }
  for (auto it = ans.rbegin(); it != ans.rend(); ++it) {
    cout << *it << endl;
  }
  return 0;
}
