#include <iostream>
#include <cmath>

using namespace std;

typedef class Point
{
public:
	int x, y;
	Point() : x(0), y(0) {}
	Point(int x, int y) : x(x), y(y) {}
	
	double length()
	{
		return sqrt((double)(x*x + y*y));
	}
	
	Point operator - (const Point& p) const
	{
		return Point(x -p.x, y-p.y);
	}
} P;

typedef struct Triangle
{
	P p1, p2, p3;
} T;

typedef struct Circle
{
	P p;
	int r;
} C;

T t;
C c;

double cross(P p1, P p2)
{
	return (double)(p1.x * p2.y - p2.x * p1.y);
}

double dist(P p1, P p2)
{
	int dx = p1.x - p2.x;
	int dy = p1.y - p2.y;
	double ans = sqrt((double)(dx*dx + dy*dy));
	return ans;
}

double ldist(P p, P e1, P e2)
{
	return abs(cross(p-e1, e2-e1)) / (e2-e1).length();
}

bool included(P p, T t)
{
	double c1 = cross(t.p1 - p, t.p2 - p);
	double c2 = cross(t.p2 - p, t.p3 - p);
	double c3 = cross(t.p3 - p, t.p1 - p);
	if(c1 > 0 && c2 > 0 && c3 > 0) return true;
	if(c1 < 0 && c2 < 0 && c3 < 0) return true;
	
	return false;
}

void solve()
{
	double d1 = dist(t.p1, c.p);
	double d2 = dist(t.p2, c.p);
	double d3 = dist(t.p3, c.p);
	double ld1 = ldist(c.p, t.p1, t.p2);
	double ld2 = ldist(c.p, t.p2, t.p3);
	double ld3 = ldist(c.p, t.p3, t.p1);
	
	if(d1 < c.r && d2 < c.r && d3 < c.r)
	{
		cout << "b" << endl;
	}
	else if(ld1 <= c.r || ld2 <= c.r || ld3 <= c.r)
	{
		cout << "c" << endl;
	}
	else if(included(c.p, t))
	{
		cout << "a" << endl;
	}
	else
	{
		cout << "d" << endl;
	}
}

int main(int argc, char** argv)
{
	int x, y, r;
	
	while( 1 )
	{
		cin >> x >> y;
		if(!x && !y) break;		
		t.p1 =P(x, y);
		
		cin >> x>> y;
		t.p2 =P(x, y);
		
		cin >> x >> y;
		t.p3 = P(x, y);
		
		cin >> x >> y >> r;
		c.p =P(x, y);
		c.r = r;
		
		solve();
	}
}