#include <iostream>
#include <vector>
#include <complex>	// require complex func
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

// deq notes ½Êô½É¨¯éxNgZ http://www.deqnotes.net/acmicpc/2d_geometry/
typedef complex<double> P;
#define EPS (1e-10)
#define EQ(a,b) (abs((a)-(b)) < EPS)
// àÏ (dot product) : a&#8901;b = |a||b|cosÆ
double dot(P a, P b) {
	return (a.real() * b.real() + a.imag() * b.imag());
}
// OÏ (cross product) : a~b = |a||b|sinÆ
double cross(P a, P b) {
	return (a.real() * b.imag() - a.imag() * b.real());
}
// _a,bð[_Æ·éüªÆ_cÆÌ£
double distance_ls_p(P a, P b, P c) {
  if ( dot(b-a, c-a) < EPS ) return abs(c-a);
  if ( dot(a-b, c-b) < EPS ) return abs(c-b);
  return abs(cross(b-a, c-a)) / abs(b-a);
}
struct T{
	P tp[3];
};
struct C{
	P cp;
	double r;
};

// ~ÌSªOp`ÉÜÜêé
bool is_cpint (T t, C c )
{
	vector <double> res (3, 0.0 );
	rep (i, 3 ){
		P A = t.tp[i], B = t.tp[(i+1) % 3], C = c.cp;
		res[i] = cross (B-A, C-A );
	} // end rep
	int plus = 0;
	rep (i, 3 ){
		if (res[i] > 0. || abs (res[i] ) < EPS ){
 			plus++;
		} // end if
	} // end rep

	return (plus == 3 || plus == 0 );
}

// ~ªOp`ÉÜÜêé
int is_cint (T t, C c )
{
	if (!is_cpint (t, c ) )
		return 0;

	int res = 0;
	rep (i, 3 ){
		P A = t.tp[i], B = t.tp[(i+1) % 3], C = c.cp;
		double d = distance_ls_p (A, B, C );
		if ( d > c.r || abs (d - c.r ) < EPS )
			res++;
	} // end rep

	return res;
}

// Op`ª~ÉÜÜêéê
int is_tinc (T t, C c )
{
	int res = 0;
	rep (i, 3 ){
		double d = abs (t.tp[i] - c.cp );
		if ( d < c.r || abs (d - c.r ) < EPS )
			res++;
	} // end rep
	
	return res;
}

// ~ªüªÆð··é
bool is_intersect (T t, C c )
{
	rep (i, 3 ){
		P A = t.tp[i], B = t.tp[(i+1) % 3], C = c.cp;
		double d = distance_ls_p (A, B, C );
		if ( d < c.r || abs (d - c.r ) < EPS )
			return true;
	} // end rep

	return false;	
}

int main()
{
	T t;
	C c;
	while (cin >> t.tp[0].real() >> t.tp[0].imag() && t.tp[0].real() != 0.0 && t.tp[0].imag() != 0.0 ){
		for (int i = 1; i < 3; i++ )
			cin >> t.tp[i].real() >> t.tp[i].imag();
		cin >> c.cp.real() >> c.cp.imag() >> c.r;

		int cint = is_cint (t, c );
		int tinc = is_tinc (t, c );
		if (cint == 3 ){	// ~ªOp`ÉÜÜêé	
			cout << 'a' << endl;
		}else 	
		if (tinc == 3 ){	// Op`ª~ÉÜÜêé
			cout << 'b' << endl;
		}else if (cint > 0 || tinc > 0 || is_intersect (t, c ) ){
			cout << 'c' << endl;
		}else{
			cout << 'd' << endl;
		} // end if
	} // end loop
		
	return 0;
}