#include <iostream>
#include <complex>
#include <vector>
#include <algorithm>
using namespace std;

typedef complex<double> P;

#define EPS (1e-10)

double dot(P a,P b){
	return (a.real() * b.real() + a.imag() * b.imag());
}

double cross(P a,P b){
	return (a.real() * b.imag() - a.imag() * b.real());
}

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);
}

bool pol_contains_cir(vector<P> p,P o,double r){
	int n = p.size();
	int cr = 0, cl = 0;
	for(int i=0;i<n;i++){
		P a = p[i];
		P b = p[(i+1)%n];
		if(EPS > cross(b-a,o-a)) cr++;
		if(0 < cross(b-a,o-a) + EPS) cl++;
		if(distance_ls_p(a,b,o) < r) return false;
	}
	if(cr != n && cl != n) return false;

	return true;
}

bool cir_contains_pol(vector<P> p,P o,double r){
	for(int i=0;i<p.size();i++){
		if(r < abs(p[i]-o)) return false;
	}
	return true;
}

bool is_intersected_ls_cir(P a,P b,P o,double r){
	double ao = abs(a-o);
	double bo = abs(b-o);

	return ((ao < r + EPS && r < bo + EPS || r < ao + EPS && bo < r + EPS) ||
					(r < ao + EPS && r < bo + EPS && distance_ls_p(a,b,o) < r + EPS));
}

bool is_intersected_pol_cir(vector<P> p,P o,double r){
	int n = p.size();

	for(int i=0;i<n;i++){
		if(is_intersected_ls_cir(p[i],p[(i+1)%n],o,r)) return true;
	}

	return false;
}

int main(void){
	/*
	P a = P(0,0);
	P b = P(0,2);
	P c = P(-0.1,1);

	cout << cross(b-a,c-a) << endl;
	*/

	while(1){
		vector<P> p;
		for(int i=0;i<3;i++){
			P tmp;
			cin>>tmp.real()>>tmp.imag();
			if(tmp.real()==0 && tmp.imag()==0) return 0;
			p.push_back(tmp);
		}

		P o;
		double r;

		cin>>o.real()>>o.imag()>>r;

		if(pol_contains_cir(p,o,r))
			cout<<"a\n";
		else if(cir_contains_pol(p,o,r)){
			cout<<"b\n";
		}
		else if(is_intersected_pol_cir(p,o,r)){
			cout<<"c\n";
		}
		else{
			cout<<"d\n";
		}
	}
}