#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
//#include <utility>
#include <set>
#include <iostream>
//#include <memory>
#include <string>
#include <vector>
#include <algorithm>
//#include <functional>
#include <sstream>
//#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
//#include <cctype>
#include <cstring>
//#include <ctime>
#include <iterator>
#include <bitset>
//#include <numeric>
//#include <list>
//#include <iomanip>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#else

#endif

using namespace std;


namespace{
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}


#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8
static const int INF=1<<24;


typedef complex<double> P;
typedef const P &rP;
typedef pair<P,P> seg;
//naiseki
double dot(rP a, rP b){
    return real(a) * real(b) + imag(a) * imag(b);
}
//gaiseki
double cross(rP a, rP b){
    return real(a) * imag(b) - imag(a) * real(b);
}
bool intersectSP(P a,P b, const P &p) {
  return abs(a-p)+abs(b-p)-abs(b-a) < EPS; // triangle inequality
}
P projection(P a,P b, const P &p) {
  double t = dot(p-a, a-b) / norm(a-b);
  return a + t*(a-b);
}
double distanceSP(P a,P b, const P &p) {
  const P r = projection(a,b, p);
  if (intersectSP(a,b, r)) return abs(r - p);
  return min(abs(a - p), abs(b - p));
}
bool foo(P a,P b,P c,P d){
	P aa=a-b,ar=d-a;
	P bb=b-c,br=d-b;
	P cc=c-a,cr=d-c;
	double a2=cross(aa,ar),b2=cross(bb,br),c2=cross(cc,cr);
	if(a2>EPS&&b2>EPS&&c2>EPS) return true;
	if(a2<-EPS&&b2<-EPS&&c2<-EPS) return true;
	return false;
}
bool foo2(P a,P b,P p,double r){
	double t=dot(b-a,p-a);
	if(a==b) return false;
	if(t<-EPS){
		// cout<<"a"<<endl;
		if(r-abs(p-a)>-EPS){
			return true;
		}
		else return false;
	}
	if(t-abs(b-a)*abs(b-a)>EPS){
		// cout<<"b"<<endl;
		if(r-abs(p-b)>-EPS){
			return true;
		}
		else{
			return false;
		}
	}
	// cout<<"c"<<endl;
	double h=abs(p-a)*abs(p-a)-t*t/abs(b-a)/abs(b-a);
	// printf("%.6lf\n",h);
	if(h-r*r>EPS){
		return false;
	}
	return true;
}

void mainmain(){
	double r;
	double x,y;
	int cnt=0;
	while(cin>>x>>y,x||y){
		cnt++;
		// cout<<x<<" "<<y<<endl;
		vector<P> z;
		z.PB(P(x,y));
		rep(i,3){
			cin>>x>>y;
			z.PB(P(x,y));
		}
		P zz[3];
		rep(i,3) zz[i]=z[i];
		cin>>r;
		if(r>=abs(z[0]-z[3])&&r>=abs(z[1]-z[3])&&r>=abs(z[2]-z[3])){
			cout<<"b\n";
			continue;
		}
		bool f=true;
		rep(i,3){
			double t=distanceSP(z[i%3],z[(i+1)%3],z[3]);
			// cout<<t<<endl;
			if(r-t>EPS){
				// cout<<"i "<<i<<endl;
				f=false;
			}
		}
		if(f&&foo(z[0],z[1],z[2],z[3])){
			cout<<"a\n";
		}
		else if(foo2(z[0],z[1],z[3],r)||foo2(z[1],z[2],z[3],r)||foo2(z[2],z[0],z[3],r)){
			
			cout<<"c\n";
		}
		else{
			cout<<"d\n";
		}
		// cout<<"aaa"<<endl;	
	}
	// cout<<abs(P(0,0)-P(1,1))<<endl;
}



}
main() try{
	// vector<P> d;
	// double r;
	// rep(i,3){
		// double x,y;
		// cin>>x>>y;
		// d.PB(P(x,y));
	// }
	// cin>>r;
	// cout<<foo2(d[0],d[1],d[2],r)<<endl;
    mainmain();
}
catch(...){
}

Measured memory_bytes: 1196