#include <bits/stdc++.h>
using namespace std;

int main()
{
    set<int> v;
    set<int> h;
    set<int>::iterator it;
    multiset<int> v1;
    multiset<int> h1;
    int m1[200005];
    int m2[200005];
    multiset<int>::iterator it1,it2;
    int i;
    int n;
    int l;
    int b;
    int x;
    char c;
    int frst;
    int last;

    cin>>b>>l>>n;
    m1[0] = l;
    m2[0] = b;
    v.insert(0);
    h.insert(0);
    v1.insert(b);
    h1.insert(l);

    while(n--) {
        scanf(" %c%d",&c,&x);
        if(c == 'H') {
            x = l-x;
            it = lower_bound(h.begin(),h.end(),x);
            //cout<<"sss"<<endl;
            it--;
            frst = *it;
            last = m1[frst];
           // cout<<frst<<' '<<last<<endl;
            h.erase(it);
            //cout<<frst<<' '<<last-x<<' '<<last-x<<' '<<last<<endl;
            h.insert(frst);
            m1[frst] = x;
            h.insert(x);
            m1[x] = last;
            it1 = find(h1.begin(),h1.end(),last-frst);
            h1.erase(it1);
            h1.insert(abs(x-frst));
            h1.insert(abs(last-x));

        }
        else {

           it = lower_bound(v.begin(),v.end(),x);
            it--;
            frst = *it;
            last = m2[frst];
            //cout<<frst<<' '<<last<<endl;
            v.erase(it);
            //cout<<frst<<' '<<last-x<<' '<<last-x<<' '<<last<<endl;
            v.insert(frst);
            m2[frst] = x;
            v.insert(x);
            m2[x] = last;
            it1 = find(v1.begin(),v1.end(),last-frst);
            v1.erase(it1);
            v1.insert(abs(x-frst));
            v1.insert(abs(last-x));

        }
        it1 = v1.end();
        it1--;
        it2 = h1.end();
        it2--;
        printf("%I64d\n",(long long)*it1 * (long long)*it2);

    }







}
