#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 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);
}

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;
    }
    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;
      }else{
	cout << "c" << endl;
      }
    }else{
      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, b.second-o.second)) < (double)r+EPS) &&
	 (dist(b, c, o) < (double)r+EPS ||
	 dist(a, c, o) < (double)r+EPS ||
	 dist(a, b, o) < (double)r+EPS)){
	cout << "c" << endl;
      }else{
	cout << "d" << endl;
      }
    }
  }
  return 0;
}