#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
	while (true) {
		bool fin = false;
		vector<int> x(3), y(3);
		for (int i = 0; i < 3; ++i) {
			cin >> x[i] >> y[i];
			if (i == 0 && x[i] == 0 && y[i] == 0) {
				fin = true;
				break;
			}
		}
		if (fin) break;
		int xc, yc, r;
		cin >> xc >> yc >> r;
		vector<int> crs(3);
		for (int i = 0; i < 3; ++i) {
			int vx = xc - x[i], vy = yc - y[i];
			int wx = x[(i + 1) % 3] - x[i], wy = y[(i + 1) % 3] - y[i];
			crs[i] = vx * wy - wx * vy;
		}
		bool inner = true;
		for (int i = 0; i < 3; ++i) {
			if (1LL * crs[i] * crs[(i + 1) % 3] < 0) {
				inner = false;
			}
		}
		int contain = 0;
		for (int i = 0; i < 3; ++i) {
			int dx = x[i] - xc, dy = y[i] - yc;
			if (dx * dx + dy * dy <= r * r) {
				++contain;
			}
		}
		int intersect = 0, border = 0;
		for (int i = 0; i < 3; ++i) {
			int dx = x[(i + 1) % 3] - x[i], dy = y[(i + 1) % 3] - y[i];
			int px = x[i] - xc, py = y[i] - yc;
			int qx = x[(i + 1) % 3] - xc, qy = y[(i + 1) % 3] - yc;
			if (px * px + py * py <= r * r || qx * qx + qy * qy <= r * r) {
				++intersect;
			}
			else {
				int pdot = dx * px + dy * py;
				int qdot = dx * qx + dy * qy;
				if (pdot <= 0 && qdot >= 0) {
					long long ca = 1LL * crs[i] * crs[i];
					long long cb = 1LL * (dx * dx + dy * dy) * (r * r);
					if (ca <= cb) {
						++intersect;
					}
					if (ca == cb) ++border;
				}
			}
		}
		if (inner) {
			if (contain == 3) {
				cout << "b" << endl;
			}
			else if (intersect - border == 0) {
				cout << "a" << endl;
			}
			else {
				cout << "c" << endl;
			}
		}
		else {
			if (contain == 3) {
				cout << "b" << endl;
			}
			else if (intersect == 0) {
				cout << "d" << endl;
			}
			else {
				cout << "c" << endl;
			}
		}
	}
	return 0;
}
