#include<bits/stdc++.h>
#define int long long
using namespace std;
int f(int k) { return k * k; }
signed main() {
	int x1, x2, x3, y1, y2, y3, xr, yr, r;
	while (cin >> x1 >> y1, x1, y1) {
		cin >> x2 >> y2;
		cin >> x3 >> y3;
		cin >> xr >> yr >> r;
		int i1 = f(x1 - xr) + f(y1 - yr) <= f(r);
		int i2 = f(x2 - xr) + f(y2 - yr) <= f(r);
		int i3 = f(x3 - xr) + f(y3 - yr) <= f(r);
		int tc = (
			((y1 - y2) * xr - (x1 - x2) * yr + x1 * y2 - x2 * y1) * ((y1 - y2) * x3 - (x1 - x2) * y3 + x1 * y2 - x2 * y1) >= 0 &&
			((y2 - y3) * xr - (x2 - x3) * yr + x2 * y3 - x3 * y2) * ((y2 - y3) * x1 - (x2 - x3) * y1 + x2 * y3 - x3 * y2) >= 0 &&
			((y3 - y1) * xr - (x3 - x1) * yr + x3 * y1 - x1 * y3) * ((y3 - y1) * x2 - (x3 - x1) * y2 + x3 * y1 - x1 * y3) >= 0);

		int p12 = (f((y1 - y2) * xr - (x1 - x2) * yr + x1 * y2 - x2 * y1) < f(r) * (f(y1 - y2) + f(x1 - x2)) && ((x1 - x2) * (xr - x1) + (y1 - y2) * (yr - y1)) * ((x1 - x2) * (xr - x2) + (y1 - y2) * (yr - y2)) <= 0);
		int p23 = (f((y2 - y3) * xr - (x2 - x3) * yr + x2 * y3 - x3 * y2) < f(r) * (f(y2 - y3) + f(x2 - x3)) && ((x2 - x3) * (xr - x2) + (y2 - y3) * (yr - y2)) * ((x2 - x3) * (xr - x3) + (y2 - y3) * (yr - y3)) <= 0);
		int p31 = (f((y3 - y1) * xr - (x3 - x1) * yr + x3 * y1 - x1 * y3) < f(r) * (f(y3 - y1) + f(x3 - x1)) && ((x3 - x1) * (xr - x3) + (y3 - y1) * (yr - y3)) * ((x3 - x1) * (xr - x1) + (y3 - y1) * (yr - y1)) <= 0);
		int ps12 = (f((y1 - y2) * xr - (x1 - x2) * yr + x1 * y2 - x2 * y1) <= f(r) * (f(y1 - y2) + f(x1 - x2)) && ((x1 - x2) * (xr - x1) + (y1 - y2) * (yr - y1)) * ((x1 - x2) * (xr - x2) + (y1 - y2) * (yr - y2)) <= 0);
		int ps23 = (f((y2 - y3) * xr - (x2 - x3) * yr + x2 * y3 - x3 * y2) <= f(r) * (f(y2 - y3) + f(x2 - x3)) && ((x2 - x3) * (xr - x2) + (y2 - y3) * (yr - y2)) * ((x2 - x3) * (xr - x3) + (y2 - y3) * (yr - y3)) <= 0);
		int ps31 = (f((y3 - y1) * xr - (x3 - x1) * yr + x3 * y1 - x1 * y3) <= f(r) * (f(y3 - y1) + f(x3 - x1)) && ((x3 - x1) * (xr - x3) + (y3 - y1) * (yr - y3)) * ((x3 - x1) * (xr - x1) + (y3 - y1) * (yr - y1)) <= 0);
		/*cout << "i1: " << i1 << endl;
		cout << "i2: " << i2 << endl;
		cout << "i3: " << i3 << endl;
		cout << "tc: " << tc << endl;
		cout << "p12: " << p12 << endl;
		cout << "p23: " << p23 << endl;
		cout << "p31: " << p31 << endl;*/
		if (i1 + i2 + i3 == 3)printf("b\n");
		else if (i1 + i2 + i3 > 0)printf("c\n");
		else if (p12 + p23 + p31 > 0)printf("c\n");
		else if (tc)printf("a\n");
		else if (ps12 + ps23 + ps31 > 0)printf("c\n");
		else printf("d\n");
	}
}
