#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    int sequenceNum = 0;
    for(;;){
        int n;
        cin >> n;
        if(n == 0)
            return 0;

        vector<double> x(2*n), y(2*n), x1(n), y1(n), x2(n), y2(n);
        for(int i=0; i<n; ++i){
            double x0, y0, r;
            cin >> x0 >> y0 >> r;
            x[2*i] = x1[i] = x0 - r;
            x[2*i+1] = x2[i] = x0 + r;
            y[2*i] = y1[i] = y0 - r;
            y[2*i+1] = y2[i] = y0 + r;
        }
        sort(x.begin(), x.end());
        sort(y.begin(), y.end());

        double ret = 0.0;
        for(int i=0; i<2*n-1; ++i){
            for(int j=0; j<2*n-1; ++j){
                for(int k=0; k<n; ++k){
                    if(x1[k] <= x[i] && x[i+1] <= x2[k] && y1[k] <= y[j] && y[j+1] <= y2[k]){
                        ret += (y[j+1] - y[j]) * (x[i+1] - x[i]);
                        break;
                    }
                }
            }
        }
        printf("%d %.02f\n", ++sequenceNum, ret);
    }
}