#include <iostream>
#include <string>
#include <cstdlib>
#include <cmath>
#include <fstream>

using namespace std;

class inPoint{
public:
  int x;
  int y;
};

class Delta{
public:
  inPoint p[3];
};

class Circle{
public:
  inPoint p;
  int radius;
};

double distance(inPoint *p1, inPoint *p2){
  return sqrt((p1->x-p2->x)*(p1->x-p2->x)+(p1->y-p2->y)*(p1->y-p2->y));
}

double dist_line(inPoint *pl1, inPoint *pl2, inPoint *p){
  int a = pl1->x - pl2->x;
  int b = pl2->y - pl1->y;
  int c = pl1->y * pl2->x - pl1->x * pl2->y;
  double ans = b * p->x + a * p->y + c;
  ans = (ans >= 0) ? ans : -ans;
  return ans / sqrt(a*a + b*b);
}
int main(void){
  string str;
  /*
  ifstream ifs("../input.txt");
  if (ifs.fail()) {
      cerr << "cannot find the file" << endl;
      return 1;
  }
  */
  while(1){
    Circle *c = (Circle *) malloc(sizeof(Circle));
    Delta *d = (Delta *) malloc(sizeof(Delta));
    for (int i = 0; i < 5; i++) {
      getline(cin, str);

      if(i == 0 && str == "0 0") break;

      int j;
      for(j = 0; j <(int) str.size(); j++){
          if(str[j] == ' '){
            str[j] = '\0';
            break;
        }
      }
      switch(i){
        case 0:
        case 1:
        case 2:
        d->p[i].x = atoi(str.c_str());
        d->p[i].y = atoi(&str[j+1]);
        break;
        case 3:
        c->p.x = atoi(str.c_str());
        c->p.y = atoi(&str[j+1]);
        break;
        case 4:
        c->radius = atoi(str.c_str());
        break;
      }

    }
    if(str == "0 0") break;


    if(distance(&d->p[0], &c->p) <= c->radius&& distance(&d->p[1], &c->p) <= c->radius&& distance(&d->p[2], &c->p) <= c->radius){
      cout << 'b' << endl;
    }
    else if(dist_line(&d->p[0], &d->p[1], &c->p) >= c->radius&& dist_line(&d->p[0], &d->p[2], &c->p) >= c->radius&& dist_line(&d->p[1], &d->p[2], &c->p) >= c->radius){
        if (dist_line(&d->p[0], &d->p[1], &d->p[2]) <= distance(&d->p[0], &c->p) && dist_line(&d->p[1], &d->p[2], &d->p[0]) <= distance(&d->p[1], &c->p) && dist_line(&d->p[2], &d->p[0], &d->p[1]) <= distance(&d->p[2], &c->p))
            cout << 'd' << endl;
        else
            cout << 'a' << endl;
    }
    else if(dist_line(&d->p[0], &d->p[1], &c->p) <= c->radius|| dist_line(&d->p[0], &d->p[2], &c->p) <= c->radius|| dist_line(&d->p[1], &d->p[2], &c->p) <= c->radius){
      cout << 'c' << endl;
    }
    else{

    }

  }
  return 0;
}