#include <bits/stdc++.h>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define EPS (1e-8)

typedef complex<double> P;
typedef P Vec;

struct Line {
	P p;
	Vec v;
	
	Line() {}
	Line(P p, Vec v) : p(p), v(v) {}
	
	P getPoint(double t) {
		return p + v * t;
	}
};

struct Circle {
	P p;
	double r;
	
	Circle() {}
	Circle(P p, double r) : p(p), r(r) {}
};

double dot(Vec a, Vec b) {
	return a.real() * b.real() + a.imag() * b.imag();
}

double cross(Vec a, Vec b) {
	return a.real() * b.imag() - a.imag() * b.real();
}

bool isInCir(Circle &c, P &p) {
	return norm(c.p - p) <= c.r*c.r + EPS;
}

bool isInSeg(Line &s, P &p) {
	Vec a = s.v, b = p - s.p;
	double l1 = abs(a), l2 = abs(b);
	
	return dot(a, b) >= l1*l2 - EPS && dot(a, b) <= l1*l2 + EPS && l1 >= l2 - EPS;
}

bool isInTri(P &a, P &b, P &c, P &d) {
	P p[4];
	p[0] = a; p[1] = b; p[2] = c; p[3] = d;
	
	int cnt = 0;
	REP(i, 3) {
		Vec v = p[3] - p[i];
		Line s(p[i], p[(i + 1) % 3] - p[i]);
		
		if (isInSeg(s, p[3])) return true;
		if (cross(s.v, v) < -EPS) cnt++;
	}
	return (cnt == 0 || cnt == 3);
}

double distanceSP(Line &s, P &p) {
	Vec a = s.v, b = p - s.p;
	return abs(cross(a, b)) / abs(a);
}

int main() {
	double x1, y1, x2, y2, x3, y3, x4, y4, r;
	while (cin >> x1 >> y1, x1 || y1) {
		cin >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> r;
		
		P p[4] = {P(x1, y1), P(x2, y2), P(x3, y3), P(x4, y4)};
		Line seg[3] = {Line(p[0], p[1] - p[0]), Line(p[1], p[2] - p[1]), Line(p[2], p[0] - p[2])};
		Circle c(p[3], r);		
		
		double m = min(distanceSP(seg[0], c.p), min(distanceSP(seg[1], c.p), distanceSP(seg[2], c.p)));
		
		if (abs(c.p - p[0]) <= c.r + EPS && abs(c.p - p[1]) <= c.r + EPS && abs(c.p - p[2]) <= c.r + EPS)
			puts("b");
		else if (isInTri(p[0], p[1], p[2], p[3])) {
			if (c.r <= m + EPS) puts("a");
			else puts("c");
		}
		else if (c.r < m - EPS) puts("d");
		else puts("c");
	}
	return 0;
}