int main() {
	while (~scanf("%d", &hull.n)) {
		for (int i = 0; i < hull.n; i++)
			scanf("%lf%lf%lf", &hull.P[i].x, &hull.P[i].y, &hull.P[i].z);
		hull.construct();
		printf("%d\n", hull.facetCnt());
	}
	return 0;
}
int main(){
	int tc;
	scanf("%d", &tc);
	for (int t = 1; t <= tc; t++){
		scanf("%d", &hull.n);
		for (int i = 0; i < hull.n; i++)
			scanf("%lf%lf%lf", &hull.P[i].x, &hull.P[i].y, &hull.P[i].z);
		hull.construct();
        printf("Case %d: %d\n", t, hull.facetCnt());
	}
	return 0;
}