import java.util.*;
import java.io.*;
class Main{
static int n;
static double[] y;
static Node[] tr;
static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
static BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
static class Segment implements Comparable<Segment>{
double x, y1, y2;
int k;
public Segment(double x, double y1, double y2, int k){
this.x = x;
this.y1 = y1;
this.y2 = y2;
this.k = k;
}
@Override
public int compareTo(Segment o){
if(this.x==o.x) return 0;
return this.x>o.x? 1:-1;
}
}
static class Node{
int l, r, cnt;
double len;
public Node(int l, int r, int cnt, double len){
this.l = l;
this.r = r;
this.cnt = cnt;
this.len = len;
}
}
static void build(int u, int l, int r){
tr[u] = new Node(l, r, 0, 0);
if(l!=r){
int mid = l + r >> 1;
build(u<<1, l, mid);
build(u<<1|1, mid+1, r);
}
}
static void pushup(int u){
if(tr[u].cnt>0) tr[u].len = y[tr[u].r+1]- y[tr[u].l];
else if(tr[u].l!=tr[u].r)
tr[u].len = tr[u<<1].len + tr[u<<1|1].len;
else tr[u].len = 0;
}
static void modify(int u, int l, int r, int k){
if(tr[u].l>=l&&tr[u].r<=r)
tr[u].cnt += k;
else{
int mid = tr[u].l + tr[u].r >> 1;
if(l<=mid) modify(u<<1, l, r, k);
if(r>mid) modify(u<<1|1, l, r, k);
}
pushup(u);
}
static int unique(double[] a){
int offset = 0;
for(int i=1; i<a.length; i++){
if(a[i]==a[i-1]){
offset++;
continue;
}
a[i-offset] = a[i];
}
return a.length - offset;
}
public static void main(String[] args) throws Exception{
int T = 1;
while(true){
String[]s = in.readLine().split(" ");
n = Integer.valueOf(s[0]);
if(n==0) break;
Segment[] segs = new Segment[2*n];
tr = new Node[8*n];
y = new double[2*n];
int i = 0, j = 0;
double x1, y1, x2, y2;
while(n-->0){
s = in.readLine().split(" ");
x1 = Double.valueOf(s[0]);
y1 = Double.valueOf(s[1]);
x2 = Double.valueOf(s[2]);
y2 = Double.valueOf(s[3]);
segs[j++] = new Segment(x1, y1, y2, 1);
segs[j++] = new Segment(x2, y1, y2, -1);
y[i++] = y1;
y[i++] = y2;
}
Arrays.sort(segs);
Arrays.sort(y);
int ll = unique(y);
HashMap<Double, Integer> map = new HashMap<>();
for(j=0; j<ll; j++) map.put(y[j], j);
build(1, 0, map.size()-2);
double res = 0;
for(i=0; i<segs.length; i++){
if(i>0) res += (segs[i].x - segs[i-1].x) * tr[1].len;
modify(1, map.get(segs[i].y1), map.get(segs[i].y2)-1, segs[i].k);
}
map.clear();
out.write("Test case #"+ T++ +"\n");
out.write("Total explored area: "+ String.format("%.2f", res)+"\n\n");
}
out.flush();
}
}