//24
#include<iostream>
#include<algorithm>
#include<iomanip>

using namespace std;

struct L{
  int y,l,r,f;
  bool operator<(L a)const{
    return y<a.y;
  }
};

int main(){
  int cs=0;
  for(int n;cin>>n,n;){
    L l[200];
    for(int i=0;i<n;i++){
      double x,y,r;
      cin>>x>>y>>r;
      L &a=l[2*i],&b=l[2*i+1];
      a.l=b.l=(x-r)*100+.5+20000;
      a.r=b.r=(x+r)*100+.5+20000;
      a.y=(y-r)*100+.5+20000;
      b.y=(y+r)*100+.5+20000;
      a.f=1;
      b.f=-1;
    }
    sort(l,l+n*2);
    int c[60001]={};
    unsigned sum=0;
    for(int i=0;i<2*n-1;i++){
      for(int j=l[i].l;j<l[i].r;j++){
	c[j]+=l[i].f;
      }
      int h=l[i+1].y-l[i].y;
      sum+=(60001-count(c,c+60001,0U))*h;
    }
    cout.precision(2);
    cout<<++cs<<' '<<fixed<<sum/10000.<<endl;
  }
  return 0;
}
      