#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int x[3], y[3], xc, yc, r, d[4];
const double INF = 10000000;

bool in() {
	bool f[3];

	for (int i = 0; i < 3; i++) {
		int j = (i + 1) % 3, k = (i + 2) % 3;
		f[i] = ((x[i] - x[j]) * (yc - y[i]) - (y[i] - y[j]) * (xc - x[i])) * ((x[i] - x[j]) * (y[k] - y[i]) - (y[i] - y[j]) * (x[k] - x[i])) >= 0;
	}

	return f[0] && f[1] && f[2];
}

double minds() {
	double g[3];
	for (int i = 0; i < 3; i++) {
		int j = (i + 1) % 3;

		if ((x[j] - x[i]) * (xc - x[i]) + (y[j] - y[i]) * (yc - y[i]) >= 0
			&& (x[i] - x[j]) * (xc - x[j]) + (y[i] - y[j]) * (yc - y[j]) >= 0)
			g[i] = pow((y[j] - y[i]) * xc - (x[j] - x[i]) * yc - x[i] * y[j] + y[i] * x[j], 2) / (pow(y[j] - y[i], 2) + pow(x[j] - x[i], 2));
		else
			g[i] = INF;
	}
		return min({ g[0], g[1], g[2] });
}

int main()
{
	cin >> x[0] >> y[0];

	while (x[0] != 0 || y[0] != 0) {
		for (int i = 1; i < 3; i++)
			cin >> x[i] >> y[i];

		cin >> xc >> yc >> r;

		for (int i = 0; i < 3; i++)
			d[i] = (int)(pow(x[i] - xc, 2) + pow(y[i] - yc, 2));
		
		int rs = r * r;

		if (rs >= d[0] && rs >= d[1] && rs >= d[2])
			cout << "b" << endl;
		else if (in() && minds() >= rs)
			cout << "a" << endl;
		else if (!in() && rs < d[0] && rs < d[1] && rs < d[2] && minds() > rs)
			cout << "d" << endl;
		else
			cout << "c" << endl;

		cin >> x[0] >> y[0];
	}

	return 0;
}

