#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <ctime>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <cstring>
#include <vector>
#include <algorithm>
#include <functional>
#include <fstream>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <numeric>
#include <cassert>
using namespace std;
static const double EPS = 1e-10;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define all(a) a.begin(),a.end()
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define SS stringstream
#define DBG1(a) rep(_X,sz(a)){printf("%d ",a[_X]);}puts("");
#define DBG2(a) rep(_X,sz(a)){rep(_Y,sz(a[_X]))printf("%d ",a[_X][_Y]);puts("");}
#define bitcount(b) __builtin_popcount(b)
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)

typedef complex<double> P;
struct L : public vector<P> {L(const P &a, const P &b) {push_back(a); push_back(b);} };

int chk(P a,P b,double r){
	double t = abs(a-b) - r;
	if( fabs(t) < EPS ) return 0;
	return t < 0 ? -1 : 1;
}
double cross(P a,P b){
	return imag(a*conj(b));
}
double dot(const P& a, const P& b) {return real(conj(a)*b);}



P projection(const L &l, const P &p) {double t = dot(p-l[0], l[0]-l[1]) / norm(l[0]-l[1]);return l[0] + t*(l[0]-l[1]);}

bool intersectSP(const L &s, const P &p) {return abs(s[0]-p)+abs(s[1]-p)-abs(s[1]-s[0]) < EPS;}

double distanceSP(const L &s, const P &p) {
	const P r = projection(s, p);
	if (intersectSP(s, r)) return abs(r - p);
	return min(abs(s[0] - p), abs(s[1] - p));
}

int main(){
	P a,b,c,d;
	double r;
	while(cin >> a.real() >> a.imag() , a.real() != 0 || a.imag() != 0 ){
		cin >> b.real() >> b.imag();
		cin >> c.real() >> c.imag();
		cin >> d.real() >> d.imag();
		cin >> r;
		
		int in = 0;
		int mk = cross(a-d,b-d) <= 0 ;
		if( mk == (cross(b-d,c-d) <= 0) && mk == (cross(c-d,a-d) <= 0)){
			in = 1;
		}
		
		if( chk(a,d,r) <= 0 &&  chk(b,d,r) <= 0 &&  chk(c,d,r) <= 0 ){
			cout << "b" << endl;
		}else if( chk(a,d,r) >= 0 &&  chk(b,d,r) >= 0 &&  chk(c,d,r) >= 0){
			if( distanceSP(L(a,b),d) < r - EPS || distanceSP(L(b,c),d) < r - EPS || distanceSP(L(a,c),d) < r - EPS  ){
				cout << "c" << endl;
			}else if( in ){
				cout << "a" << endl;
			}else{
				cout << "d" << endl;
			}
		}else{
			cout << "c" << endl;
		}
	

		
	}
}