#include<iostream>
#include<cmath>
#include<vector>
#include<algorithm>
#define EPS (1e-10)
using namespace std;

static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;


class Point
{
  public:
  double x,y;

  Point(double x = -1,double y = -1): x(x),y(y){}

  Point operator + (Point p ){return Point(x+p.x,y+p.y);}
  Point operator - (Point p){return Point(x-p.x,y-p.y);}
  Point operator * (double a){return Point(a*x,a*y);}

  bool operator < (const Point& p) const
  {
    return x != p.x?x<p.x:y<p.y;
  }

  bool operator == (const Point& p)const
  {
    return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
  }
};

struct Segment
{
  Point p1,p2;
  Segment(Point p1 = Point(-1,-1),Point p2 = Point(-1,-1)):p1(p1),p2(p2){}
};
typedef Segment Line;
typedef vector<Point> Polygon;

struct Circle
{
  Point p;
  double r;
  Circle(Point p=Point(0,0),double r=0):p(p),r(r){}
};

double dot(Point a,Point b)
{
  return a.x*b.x + a.y*b.y;
}

double cross(Point a,Point b)
{
  return a.x*b.y - a.y*b.x;
}

double norm(Point a)
{
  return a.x*a.x+a.y*a.y;
}

double abs(Point a)
{
  return sqrt(norm(a));
}

double getDistancePP(Point p1,Point p2)
{
  return sqrt(pow(p1.x-p2.x,2)+pow(p1.y-p2.y,2));
}

bool isTriangleInCircle(vector<Point> &p,Circle c)
{
  double d1,d2,d3;
  d1 = getDistancePP(p[0],c.p);
  d2 = getDistancePP(p[1],c.p);
  d3 = getDistancePP(p[2],c.p);
  return d1 <= c.r && d2 <= c.r && d3 <= c.r;
}

double getDistanceLP(Line s,Point p)
{
  return abs(cross(s.p2-s.p1,p-s.p1))/abs(s.p2-s.p1);
}

double getDistanceSP(Segment s,Point p)
{
  if(dot(s.p2-s.p1,p-s.p1) < 0.0)return abs(p-s.p1);
  if(dot(s.p1-s.p2,p-s.p2) < 0.0)return abs(p-s.p2);
  return getDistanceLP(s,p);
}


int ccw(Point p0,Point p1,Point p2)
{
  Point a = p1-p0;
  Point b = p2-p0;
  if(cross(a,b) > 0)return COUNTER_CLOCKWISE;
  if(cross(a,b) < 0)return CLOCKWISE;
  if(dot(a,b) < 0)return ONLINE_BACK;
  if(norm(a) < norm(b))return ONLINE_FRONT;
  return ON_SEGMENT;
}

bool isPointInTriangle(vector<Point> &p,Point c)
{
  return (ccw(p[0],p[1],c) == CLOCKWISE && ccw(p[1],p[2],c) == CLOCKWISE && ccw(p[2],p[0],c) == CLOCKWISE) || (ccw(p[0],p[1],c) == COUNTER_CLOCKWISE && ccw(p[1],p[2],c) == COUNTER_CLOCKWISE && ccw(p[2],p[0],c) == COUNTER_CLOCKWISE);
}

bool isCircleInTriangle(vector<Point> &p,Circle c)
{
  double dist[3];
  dist[0] = getDistanceSP(Segment(p[0],p[1]),c.p);
  dist[1] = getDistanceSP(Segment(p[1],p[2]),c.p);
  dist[2] = getDistanceSP(Segment(p[2],p[0]),c.p);  
  return isPointInTriangle(p,c.p) && dist[0] >= c.r && dist[1] >= c.r && dist[2] >= c.r; 
}

void printP(Point p)
{
  cout << p.x << " x " << p.y << endl; 
}

int main()
{
  vector<Point> T(3);
  while(cin >> T[0].x >> T[0].y,(int)T[0].x|(int)T[0].y)
    {
      for(int i=1;i<=2;i++)
	cin >> T[i].x >> T[i].y;     
      Circle c;
      cin >> c.p.x >> c.p.y;
      cin >> c.r;

      double dist[3];
      dist[0] = getDistanceSP(Segment(T[0],T[1]),c.p);
      dist[1] = getDistanceSP(Segment(T[1],T[2]),c.p);
      dist[2] = getDistanceSP(Segment(T[2],T[0]),c.p);  

      if(isTriangleInCircle(T,c))
	cout << 'b' << endl;
      else if(isCircleInTriangle(T,c))
	cout << 'a' << endl;
      else if(dist[0] <= c.r || dist[1] <= c.r || dist[2] <= c.r)
	cout << 'c' << endl;
      else 
	cout << 'd' << endl;      


    }
  return 0;
}

Measured memory_bytes: 1216