#include <iostream>
#include <map>
#include <cmath>

using namespace std;

const double EPS = 1e-10;

pair<int, int> a;
pair<int, int> b;
pair<int, int> c;
pair<int, int> o;
int r;

int dot(pair<int, int> p1, pair<int, int> p2){
  return p1.first * p2.first + p1.second * p2.second;
}

int cross(pair<int, int> p1, pair<int, int> p2){
  return p1.first * p2.second - p1.second * p2.first;
}

double length(pair<int, int> p){
  return sqrt(p.first * p.first + p.second * p.second);
}

bool is_inside(){
  if(cross(make_pair(b.first-a.first, b.second-a.second), 
	   make_pair(o.first-a.first, o.second-a.second)) < 0) return false;
  if(cross(make_pair(c.first-b.first, c.second-b.second), 
	   make_pair(o.first-b.first, o.second-b.second)) < 0) return false;
  if(cross(make_pair(a.first-c.first, a.second-c.second), 
	   make_pair(o.first-c.first, o.second-c.second)) < 0) return false;
  return true;
}

double dist(pair<int, int> p1, pair<int, int> p2, pair<int, int> p3){
  pair<int, int> p4 = make_pair(p2.first - p1.first, p2.second - p1.second);
  pair<int, int> p5 = make_pair(p3.first - p1.first, p3.second - p1.second);
  double tmp = length(p4);
  return abs((double)cross(p4, p5) / tmp);
}

double dist2(pair<int, int> p1, pair<int, int> p2, pair<int, int> p3){
  pair<int, int> p7 = make_pair(p2.first - p1.first, p2.second - p1.second);
  pair<int, int> p4 = make_pair(p1.first - p2.first, p1.second - p2.second);
  pair<int, int> p5 = make_pair(p3.first - p2.first, p3.second - p2.second);
  pair<int, int> p6 = make_pair(p3.first - p1.first, p3.second - p1.second);
  if(dot(p7, p6) < 0) return length(p6)*length(p6);
  if(dot(p4, p5) < 0) return length(p5)*length(p5);
  return dist(p1, p2, p3);
}

main(){
  while(cin >> a.first >> a.second && a.first && a.second){
    cin >> b.first >> b.second;
    cin >> c.first >> c.second;
    cin >> o.first >> o.second;
    cin >> r;
    if(length(make_pair(a.first-o.first, a.second-o.second)) < (double)r+EPS && 
       length(make_pair(b.first-o.first, b.second-o.second)) < (double)r+EPS &&
       length(make_pair(c.first-o.first, c.second-o.second)) < (double)r+EPS){
      cout << "b" << endl;
      continue;
    }
    else if(is_inside()){
      if(dist(b, c, o) > (double)r-EPS && 
	 dist(a, c, o) > (double)r-EPS && 
	 dist(a, b, o) > (double)r-EPS){
	cout << "a" << endl;
	continue;
      }
    }
    if(dist2(b, c, o) < (double)r+EPS ||
       dist2(a, c, o) < (double)r+EPS ||
       dist2(a, b, o) < (double)r+EPS){
      cout << "c" << endl;
      continue;
    }
    cout << "d" << endl;
  }
  return 0;
}