#include <bits/stdc++.h>

using namespace std;

int sirina, visina, n, operacija, tacka, x, y, r;
bool bp[100005];
double sol[200008];

int main (){
    cout << setprecision(10) << fixed;
    cin >> sirina >> visina >> r >> n;
    for (int i = 0; i <= 200000; i++){
        sol[i] = visina;
    }
//  10 poena:
    if (r == 1){
        for (int i = 1; i <= n; i++){
            cin >> operacija;

            if (operacija == 2){
                cin >> tacka;
            }
            else {
                cin >> x >> y;
                bp [y] = true;
                if (y == visina and bp[visina-1] == false){
                    sol[x] -= 1;
                }
                else if (y < visina and bp[y-1] == false and bp[y+1] == false){
                    sol[x] -= 2;
                }
                else if (y == visina and bp[y-1] == true){
                    sol[x] -= 0;
                }
                else if (y < visina and bp[y-1]==true  and bp[y+1]==false or bp[y+1]==true  and bp[y-1]==false ){
                    sol[x] -= 1;
                }
            }
        }
    }
//  20 poena:
    else if (r == 2){

    }
    return 0;
}