#include <bits/stdc++.h>
namespace FastIO {
struct Reader {
  char buf[1 << 20], *s, *t;
  bool EOF_FLG;
  Reader() : s(buf), t(buf), EOF_FLG(false){};
  char gt() {
    return s == t && ((t = (s = buf) + fread(buf, 1, 1 << 20, stdin)) == s)
               ? EOF
               : (*s++);
  }
  Reader& operator>>(char* str) {
    if (EOF_FLG) return *str = 0, *this;
    while ((*str = gt()) != ' ' && *str != '\n' && *str != EOF) ++str;
    if (*str == EOF) EOF_FLG = true;
    *str = 0;
    return *this;
  }
  template <typename T>
  Reader& operator>>(T& x) {
    if (EOF_FLG) return *this;
    char c = 0, d;
    while (c != EOF && (c < '0' || c > '9')) d = c, c = gt();
    if (c == EOF) {
      EOF_FLG = true;
      return *this;
    } else
      x = 0;
    while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = gt();
    if (d == '-') x = -x;
    return *this;
  }
} in;
struct Writer {
  char buf[1 << 20], *s, *t;
  Writer() : s(buf), t(buf + (1 << 20)) {}
  ~Writer() { fwrite(buf, 1, s - buf, stdout); }
  void pt(char c) {
    (s == t) ? (fwrite(s = buf, 1, 1 << 20, stdout), *s++ = c) : (*s++ = c);
  }
  template <typename T>
  Writer& operator<<(T x) {
    if (!x) return pt('0'), *this;
    if (x < 0) pt('-'), x = -x;
    char a[40], t = 0;
    while (x) a[t++] = x % 10, x /= 10;
    while (t--) pt(a[t] + '0');
    return *this;
  }
  Writer& operator<<(const char* s) {
    while (*s) pt(*s++);
    return *this;
  }
} out;
}  // namespace FastIO
using namespace FastIO;
namespace ZDY {
template <class T>
T ABS(T x) {
  return x > 0 ? x : -x;
}
template <class T>
T MAX(T x, T y) {
  return x > y ? x : y;
}
template <class T>
T MIN(T x, T y) {
  return x < y ? x : y;
}
template <class T>
T GCD(T x, T y) {
  return y ? GCD(y, x % y) : x;
}
void SWAP(int& x, int& y) {
  x ^= y;
  y ^= x;
  x ^= y;
}
}  // namespace ZDY
using namespace ZDY;
using namespace std;
int D, S, k;
struct seg {
  long long sl[1000001 << 2], sr[1000001 << 2], s[1000001 << 2];
  bool b[1000001 << 2];
  void pu(int rt) {
    if (!b[rt]) return;
    s[rt] = MAX(MAX(s[rt << 1], s[rt << 1 | 1]), sr[rt << 1] + sl[rt << 1 | 1]);
    sl[rt] = sl[rt << 1] + ((!b[rt << 1]) ? (sl[rt << 1 | 1]) : 0);
    sr[rt] = sr[rt << 1 | 1] + ((!b[rt << 1 | 1]) ? (sr[rt << 1]) : 0);
  }
  void build(int l, int r, int rt) {
    sl[rt] = sr[rt] = s[rt] = r - l + 1;
    if (l == r) return;
    int m = (l + r) >> 1;
    build(l, m, rt << 1);
    build(m + 1, r, rt << 1 | 1);
  }
  void upd(int L, int l, int r, int rt) {
    b[rt] = 1;
    if (l == r) {
      sr[rt] = 0;
      return;
    }
    int m = (l + r) >> 1;
    if (L <= m)
      upd(L, l, m, rt << 1);
    else
      upd(L, m + 1, r, rt << 1 | 1);
    pu(rt);
  }
} A, B;
int main() {
  in >> D >> S >> k;
  A.build(1, D, 1);
  B.build(1, S, 1);
  int x;
  char ch[10];
  while (k--) {
    in >> ch >> x;
    if (ch[0] == 'V')
      A.upd(x, 1, D, 1);
    else
      B.upd(x, 1, S, 1);
    out << A.s[1] * B.s[1] << "\n";
  }
}
