#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;



struct Point{
	Point(double arg_x,double arg_y){
		x = arg_x;
		y = arg_y;
	}

	Point(){
		x = y = 0.0;
	}

	Point operator + (Point p){ return Point(x+p.x,y+p.y); }
	Point operator - (Point p){ return Point(x-p.x,y-p.y);}
	Point operator * (double a){ return Point(a*x,a*y); }
	Point operator / (double a){ return Point(x/a,y/a); }

	double abs(){ return sqrt(norm()); }
	double norm(){ return x*x + y*y; }

	bool operator<(const Point &p) const{
		return x != p.x? x < p.x: y < p.y;
	}

	bool operator == (const Point &p) const{
		return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
	}

	double x,y;
};

typedef Point Vector;

struct Line{
	Line(){

	}
	Line(Point a,Point b){
		p[0] = a;
		p[1] = b;
	}
	Point p[2];
};

struct Circle{
	Point center;
	double r;
};


Point point[3];
Line line[3];
Circle circle;
typedef vector<Point> Polygon;

Point calc_minus(Point a,Point b){
    Point ret;

    ret.x = a.x-b.x;
    ret.y = a.y-b.y;

    return ret;
}

double calc_len(Vector a){
    return sqrt(a.x*a.x+a.y*a.y);
}

double cross(Vector a,Vector b){
    return a.x*b.y-a.y*b.x;
}

double dot(Vector a,Vector b){
    return a.x*b.x + a.y*b.y;
}

//線分ではなく直線と点の距離
double getDistanceLP(Line l,Point p){
    return fabs(cross(calc_minus(l.p[1],l.p[0]),calc_minus(p,l.p[0]))/calc_len(calc_minus(l.p[1],l.p[0])));
}

//点と線分の距離
double getDistanceSP(Line l,Point p){
	if(dot(calc_minus(l.p[1],l.p[0]),calc_minus(p,l.p[0])) < 0.0)return calc_len(calc_minus(p,l.p[0]));
	if(dot(calc_minus(l.p[0],l.p[1]),calc_minus(p,l.p[1])) < 0.0)return calc_len(calc_minus(p,l.p[1]));
	return getDistanceLP(l,p);
}


/*
 * IN 2
 * ON 1
 * OUT 0
 *
 */
int contains(Polygon g,Point p){
	int n = g.size();
	bool x = false;
	for(int i = 0; i < n; i++){
		Point a = g[i]-p,b = g[(i+1)%n]-p;
		if(abs(cross(a,b)) < EPS && dot(a,b) < EPS)return 1;
		if(a.y > b.y)swap(a,b);
		if(a.y < EPS && EPS < b.y && cross(a,b) > EPS) x = !x;
	}
	return (x ? 2:0);
}

double calc_dist(Point A,Point B){

	return sqrt((A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y));
}

void func(){

	for(int i = 1; i <= 2; i++){

		scanf("%lf %lf",&point[i].x,&point[i].y);
	}

	for(int i = 0; i <= 2; i++){

		line[i].p[0] = point[i];
		line[i].p[1] = point[(i+1)%3];
	}

	Polygon polygon;
	for(int i = 0; i < 3; i++){

		polygon.push_back(point[i]);
	}

	scanf("%lf %lf",&circle.center.x,&circle.center.y);
	scanf("%lf",&circle.r);

	double dist1 = getDistanceSP(line[0],circle.center);
	double dist2 = getDistanceSP(line[1],circle.center);
	double dist3 = getDistanceSP(line[2],circle.center);
	bool is_in = contains(polygon,circle.center);

	if(calc_dist(point[0],circle.center) <= circle.r && calc_dist(point[1],circle.center) <= circle.r
			&& calc_dist(point[2],circle.center) <= circle.r){

		printf("b\n");

	}else if(is_in && dist1 >= circle.r && dist2 >= circle.r && dist3 >= circle.r){

		printf("a\n");

	}else{

		if(dist1 > circle.r && dist2 > circle.r && dist3 > circle.r){

			printf("d\n");
		}else{

			printf("c\n");
		}
	}
}

int main(){

	int x,y;

	while(true){

		scanf("%d %d",&x,&y);
		if(x == 0 && y == 0)break;

		point[0].x = x;
		point[0].y = y;

		func();
	}

	return 0;
}



Measured memory_bytes: 3104