#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <climits>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <vector>
#include <queue>
#include <string>
#include <complex>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)
#define repa(i,s,e) for(int i=s; i<=e; i++)
#define repd(i,s,e) for(int i=s; i>=e; i--)

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;

const double EPS = 1.0e-10;

class P {
public:
	double x, y;
	P() {}
	P(double x_, double y_) : x(x_), y(y_) {}
	P(const P& p) : x(p.x), y(p.y) {}
	P operator+(const P& p) const { return P(x+p.x, y+p.y); } 
	P operator-(const P& p) const { return P(x-p.x, y-p.y); }
	P operator-() const { return P(-x, -y); }
	P operator*(double s) const { return P(x*s, y*s); }
	P operator/(double s) const { return P(x/s, y/s); }
	P& operator=(const P& p) { x=p.x; y=p.y; return (*this); }
	double dot(const P& p) const { return x*p.x + y*p.y; }
	double det(const P& p) const { return x*p.y - y*p.x; }
	double norm() const { return sqrt(x*x + y*y); }
	double norm2() const { return x*x + y*y; }
};

double tri(P a, P b, P c) { return (b - a).det(c - a); }
double sign(double r) { return r < -EPS ? -1.0 : r > EPS ? 1.0 : 0.0; }

class L {
public:
	P s, t;
	L() {}
	L(P s_, P t_) : s(s_), t(t_) {}
	L(const L& l) : s(l.s), t(l.t) {}
	L& operator=(const L& l) { s=l.s; t=l.t; return (*this); }
	double length() { return (s - t).norm(); }
	P vec() const { return t - s; }
	double dLP(const P& p) const { return abs(tri(s, t, p)) / vec().norm(); }
	double dSP(const P& p) const {
		if(sign(vec().dot(p - s)) <= 0.0) return (p - s).norm();
		if(sign(vec().dot(p - t)) >= 0.0) return (p - t).norm();
		return dLP(p);
	}
};

class C {
public:
	P p;
	double r;
	C() {}
	C(P p_, double r_) : p(p_), r(r_) {}
	C(const C& c) : p(c.p), r(c.r) {}
	C& operator=(const C& c) { p=c.p; r=c.r; return (*this); }
};


// code for problem
int x, y, r;
vector<P> T;
C cc;

bool isPinC() {
	P e0 = T[0] - cc.p;
	P e1 = T[1] - cc.p;
	P e2 = T[2] - cc.p;
	double d0 = e0.det(e1);
	double d1 = e1.det(e2);
	double d2 = e2.det(e0);
	if(sign(d0) == sign(d1) && sign(d1) == sign(d2)) return true;
	return false;
}

void solve() {
	vector<double> d(3);
	d[0] = (T[0] - cc.p).norm();
	d[1] = (T[1] - cc.p).norm();
	d[2] = (T[2] - cc.p).norm();
	if(sign(d[0] - cc.r) <= 0.0 && sign(d[1] - cc.r) <= 0.0 && sign(d[2] - cc.r) <= 0.0) {
		printf("b\n");
		return;
	}

	bool in = isPinC();
	L l0(T[0], T[1]);
	L l1(T[1], T[2]);
	L l2(T[2], T[0]);
	d[0] = l0.dSP(cc.p);
	d[1] = l1.dSP(cc.p);
	d[2] = l2.dSP(cc.p);
	if(in && sign(d[0] - cc.r) >= 0.0 && sign(d[1] - cc.r) >= 0.0 && sign(d[2] - cc.r) >= 0.0) {
		printf("a\n");
		return;
	}

	sort(d.begin(), d.end());
	if(!in && sign(d[0] - cc.r) > 0.0) {
		printf("d\n");
		return;
	}

	printf("c\n");
}

int main() {
	T = vector<P>(3);
	for(;;) {
		scanf("%d%d", &x, &y);
		if(x == 0 && y == 0) break;
		T[0] = P(x, y);

		scanf("%d%d", &x, &y);
		T[1] = P(x, y);

		scanf("%d%d", &x, &y);
		T[2] = P(x, y);

		scanf("%d%d%d", &x, &y, &r);
		cc = C(P(x, y), r);

		solve();
	}
}
        

Measured memory_bytes: 1188