#include <bits/stdc++.h>
#define pii pair<int, int>
#define rep(i,a,b) for(i=a;i<b;++i)
#define repi(i,a,b) for(int i=a;i<b;++i)
#define F first
#define S second
using namespace std;
long long int ans=0;
set<int> cutv;
set<int> cuth;
map<int,int>maxw;
map<int,int>maxh;
int w,h,n;
int main() {
// your code goes here
ios::sync_with_stdio(false);
cutv.insert(0);
cuth.insert(0);
cin>>w>>h>>n;
cutv.insert(w);
cuth.insert(h);
maxw[w]++;
maxh[h]++;
string ty;
int pos;
repi(i,0,n)
{
cin>>ty;
cin>>pos;
if(ty[0]=='V')
{
set<int>::iterator up = cutv.lower_bound(pos);
set<int>::iterator down = up;
--down;
auto it = maxw.find((*up - *down));
(it->second)--;
if(it->second==0)maxw.erase(it);
maxw[*up-pos]++;
maxw[pos-*down]++;
cutv.insert(pos);
cout<<(*maxw.rbegin()).first * (long long)(*maxh.rbegin()).first<<endl;
}
else
{
set<int>::iterator up = cuth.lower_bound(pos);
set<int>::iterator down = up;
--down;
auto it = maxh.find((*up - *down));
(it->second)--;
if(it->second==0)maxh.erase(it);
maxh[*up-pos]++;
maxh[pos-*down]++;
cuth.insert(pos);
cout<<(*maxh.rbegin()).first * (long long)(*maxw.rbegin()).first <<endl;
}
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgcGlpIHBhaXI8aW50LCBpbnQ+CiNkZWZpbmUgcmVwKGksYSxiKSBmb3IoaT1hO2k8YjsrK2kpCiNkZWZpbmUgcmVwaShpLGEsYikgZm9yKGludCBpPWE7aTxiOysraSkKI2RlZmluZSBGIGZpcnN0CiNkZWZpbmUgUyBzZWNvbmQKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKbG9uZyBsb25nIGludCBhbnM9MDsKCnNldDxpbnQ+IGN1dHY7CnNldDxpbnQ+IGN1dGg7Cm1hcDxpbnQsaW50Pm1heHc7Cm1hcDxpbnQsaW50Pm1heGg7CmludCB3LGgsbjsKaW50IG1haW4oKSB7CiAgICAvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCiAgICBpb3M6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CiAgICBjdXR2Lmluc2VydCgwKTsKICAgIGN1dGguaW5zZXJ0KDApOwogICAgY2luPj53Pj5oPj5uOwogICAgY3V0di5pbnNlcnQodyk7CiAgICBjdXRoLmluc2VydChoKTsKICAgIAogICAgbWF4d1t3XSsrOwogICAgbWF4aFtoXSsrOwogICAgc3RyaW5nIHR5OwogICAgaW50IHBvczsKICAgIHJlcGkoaSwwLG4pCiAgICB7CiAgICAgICAgY2luPj50eTsKICAgICAgICBjaW4+PnBvczsKICAgICAgICBpZih0eVswXT09J1YnKQogICAgICAgIHsKICAgICAgICAgICAgc2V0PGludD46Oml0ZXJhdG9yIHVwID0gY3V0di5sb3dlcl9ib3VuZChwb3MpOwogICAgICAgICAgICBzZXQ8aW50Pjo6aXRlcmF0b3IgZG93biA9IHVwOwogICAgICAgICAgICAtLWRvd247CgogICAgICAgICAgICBhdXRvIGl0ID0gbWF4dy5maW5kKCgqdXAgLSAqZG93bikpOwogICAgICAgICAgICAoaXQtPnNlY29uZCktLTsKICAgICAgICAgICAgaWYoaXQtPnNlY29uZD09MCltYXh3LmVyYXNlKGl0KTsKICAgICAgICAgICAgbWF4d1sqdXAtcG9zXSsrOwogICAgICAgICAgICBtYXh3W3Bvcy0qZG93bl0rKzsKICAgICAgICAgICAgY3V0di5pbnNlcnQocG9zKTsKICAgICAgICAgICAgY291dDw8KCptYXh3LnJiZWdpbigpKS5maXJzdCAqIChsb25nIGxvbmcpKCptYXhoLnJiZWdpbigpKS5maXJzdDw8ZW5kbDsKICAgICAgICAgICAgCiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgIHNldDxpbnQ+OjppdGVyYXRvciB1cCA9IGN1dGgubG93ZXJfYm91bmQocG9zKTsKICAgICAgICAgICAgc2V0PGludD46Oml0ZXJhdG9yIGRvd24gPSB1cDsKICAgICAgICAgICAgLS1kb3duOwogICAgICAgICAgICAKICAgICAgICAgICAgYXV0byBpdCA9IG1heGguZmluZCgoKnVwIC0gKmRvd24pKTsKICAgICAgICAgICAgKGl0LT5zZWNvbmQpLS07CiAgICAgICAgICAgIGlmKGl0LT5zZWNvbmQ9PTApbWF4aC5lcmFzZShpdCk7CiAgICAgICAgICAgIG1heGhbKnVwLXBvc10rKzsKICAgICAgICAgICAgbWF4aFtwb3MtKmRvd25dKys7CiAgICAgICAgICAgIGN1dGguaW5zZXJ0KHBvcyk7CiAgICAgICAgICAgIGNvdXQ8PCgqbWF4aC5yYmVnaW4oKSkuZmlyc3QgKiAobG9uZyBsb25nKSgqbWF4dy5yYmVnaW4oKSkuZmlyc3QgPDxlbmRsOwogICAgICAgIH0KICAgIH0KICAgIHJldHVybiAwOwp9