#include<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
bool CL_intersect(int ax,int ay,int bx,int by,int cx,int cy,int r){
	int acx=cx-ax;
	int acy=cy-ay;
	int bcx=cx-bx;
	int bcy=cy-by;
	int abx=bx-ax;
	int aby=by-ay;
	if(acx*acx+acy*acy>=r*r||bcx*bcx+bcy*bcy>=r*r){
		if(abx*acx+aby*acy<0){
			if(acx*acx+acy*acy<=r*r)return true;
		}else{
			if(abx*acx+aby*acy>abx*abx+aby*aby){
				if(bcx*bcx+bcy*bcy<=r*r)return true;
			}else if(acx*acx+acy*acy-(long long)(abx*acx+aby*acy)*(abx*acx+aby*acy)/(abx*abx+aby*aby)<=r*r)return true;
		}
	}
	return false;
}
bool inclusive(int ax,int ay,int bx,int by,int cx,int cy,int px,int py){
	bool ok1=true;
	bool ok2=true;
	if((bx-ax)*(py-ay)-(px-ax)*(by-ay)<0)ok1=false;
	if((bx-ax)*(py-ay)-(px-ax)*(by-ay)>0)ok2=false;
	if((cx-bx)*(py-by)-(px-bx)*(cy-by)<0)ok1=false;
	if((cx-bx)*(py-by)-(px-bx)*(cy-by)>0)ok2=false;
	if((ax-cx)*(py-cy)-(px-cx)*(ay-cy)<0)ok1=false;
	if((ax-cx)*(py-cy)-(px-cx)*(ay-cy)>0)ok2=false;
	return ok1||ok2;
}
double dist(int ax,int ay,int bx,int by,int px,int py){
	double dx=bx-ax;
	double dy=by-ay;
	double A=dx*dx+dy*dy;
	double B=dx*(ax-px)+dy*(ay-py);
	double t=-B/A;
	if(t<0)t=0;
	if(t>1)t=1;
	double tx=ax+dx*t,ty=ay+dy*t;
	return sqrt((px-tx)*(px-tx)+(py-ty)*(py-ty));
}
int main(){
	int a,b,c,d,e,f,g,h,r;
	while(scanf("%d%d",&a,&b),a||b){
		scanf("%d%d%d%d%d%d%d",&c,&d,&e,&f,&g,&h,&r);
		if((a-g)*(a-g)+(b-h)*(b-h)<=r*r&&(c-g)*(c-g)+(d-h)*(d-h)<=r*r&&(e-g)*(e-g)+(f-h)*(f-h)<=r*r)printf("b\n");
		else if(dist(a,b,c,d,g,h)>(double)r-0.000001&&dist(a,b,e,f,g,h)>(double)r-0.000001&&dist(e,f,c,d,g,h)>(double)r-0.000001&&inclusive(a,b,c,d,e,f,g,h))printf("a\n");
		else if(CL_intersect(a,b,c,d,g,h,r)||CL_intersect(a,b,e,f,g,h,r)||CL_intersect(e,f,c,d,g,h,r))printf("c\n");
		else printf("d\n");
	}
}