#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i < (n); i++)
typedef double D;      // ??§?¨?????????????double???long double?????????
typedef complex<D> P;  // Point
typedef pair<P, P> L;  // Line
typedef vector<P> VP;
const D EPS = 1e-9;    // ?¨±??????????????????????????£????????????
#define X real()
#define Y imag()
#define LE(n,m) ((n) < (m) + EPS)
#define GE(n,m) ((n) + EPS > (m))
#define EQ(n,m) (abs((n)-(m)) < EPS)
D dot(P a, P b) {return (conj(a)*b).X; }
D cross(P a, P b) {  return (conj(a)*b).Y;}
int ccw(P a, P b, P c) {
  b -= a;  c -= a;
  if (cross(b,c) >  EPS) return +1;  // counter clockwise
  if (cross(b,c) < -EPS) return -1;  // clockwise
  if (dot(b,c)   < -EPS) return +2;  // c--a--b on line
  if (norm(b) < norm(c)) return -2;  // a--b--c on line or a==b
  return 0;                          // a--c--b on line or a==c or b==c
}
bool isecSP(P a1, P a2, P b) {
  return !ccw(a1, a2, b);
}
P proj(P a1, P a2, P p) {
  return a1 + dot(a2-a1, p-a1)/norm(a2-a1) * (a2-a1);
}
D distSP(P a1, P a2, P p) {
  P r = proj(a1, a2, p);
  if (isecSP(a1, a2, r)) return abs(r-p);
  return min(abs(a1-p), abs(a2-p));
}

D dis(P a,P b){
	return sqrt((a.X-b.X)*(a.X-b.X)+(a.Y-b.Y)*(a.Y-b.Y));
}
double x1,x2,x3,y4,y2,y3,x,y,r;
main(){
	while(cin>>x1>>y4,x1||y4){
		cin>>x2>>y2>>x3>>y3>>x>>y>>r;
		if(dis(P(x1,y4),P(x,y))<r&&dis(P(x2,y2),P(x,y))<r&&dis(P(x3,y3),P(x,y))<r)cout<<'b'<<endl;
		else if(distSP(P(x1,y4),P(x2,y2),P(x,y))<=r||distSP(P(x3,y3),P(x2,y2),P(x,y))<=r||distSP(P(x1,y4),P(x3,y3),P(x,y))<=r)cout<<'c'<<endl;
		else if(ccw(P(x1,y4),P(x2,y2),P(x,y))==ccw(P(x2,y2),P(x3,y3),P(x,y))==ccw(P(x3,y3),P(x1,y4),P(x,y)))cout<<'a'<<endl;
		else cout<<'d'<<endl;
	}
}