#include <iostream>
#include <string>
#include <vector>
using namespace std;

const double eps = 1e-8;
int x1, y1, x2, y2, x3, y3, x4, y4, r;

double distDbl(double ax, double ay, double bx, double by) {
    return (bx - ax) * (bx - ax) + (by - ay) * (by - ay);
}

int distDbl(int ax, int ay, int bx, int by) {
    return (bx - ax) * (bx - ax) + (by - ay) * (by - ay);
}

double getPerpDistDbl(double ax, double ay, double bx, double by, double cx, double cy) {
    double a, b, res;
    if (ax == bx) {
        res = (cx - ax) * (cx - ax);
    } else {
        a = (by - ay) / (bx - ax);
        b = ay - a * ax;
        res = (a * cx - cy + b) * (a * cx - cy + b) / (1 + a * a);
    }
    return res;
}

double getPerpDistSegDbl(double ax, double ay, double bx, double by, double cx, double cy) {
    double a, b, x, y, res;
    if (ax == bx) {
        y = cy;
        if (min(ay, by) <= y && y <= max(ay,by)) {
            res = (cx - ax) * (cx - ax);
        } else {
            res = min(distDbl(ax,ay,cx,cy), distDbl(bx,by,cx,cy));
        }
    } else {
        a = (by - ay) / (bx - ax);
        b = ay - a * ax;
        x = (cx + a * (cy - b)) / (1 + a * a);
        y = a * x + b;
        if (min(ax, bx) <= x && x <= max(ax,bx) &&
            min(ay, by) <= y && y <= max(ay,by)) {
            res = distDbl(x,y,cx,cy);
        } else {
            res = min(distDbl(ax,ay,cx,cy), distDbl(bx,by,cx,cy));
        }
    }
    return res;
}

bool isA() {
    int c = 0;
    if (0 <= (x2-x1)*(y4-y1)-(y2-y1)*(x4-x1)) ++c;
    if (0 <= (x3-x2)*(y4-y2)-(y3-y2)*(x4-x2)) ++c;
    if (0 <= (x1-x3)*(y4-y3)-(y1-y3)*(x4-x3)) ++c;
    if (c % 3 != 0) return false;
    if (getPerpDistDbl(x1, y1, x2, y2, x4, y4) + eps < r*r) return false;
    if (getPerpDistDbl(x2, y2, x3, y3, x4, y4) + eps < r*r) return false;
    if (getPerpDistDbl(x3, y3, x1, y1, x4, y4) + eps < r*r) return false;
    return true;
}

bool isB() {
    if (distDbl(x1,y1,x4,y4) <= r*r && distDbl(x2,y2,x4,y4) <= r*r && distDbl(x3,y3,x4,y4) <= r*r) {
        return true;
    }
    return false;
}

bool isC() {
    if (getPerpDistSegDbl(x1,y1,x2,y2,x4,y4) <= r*r + eps) return true;
    if (getPerpDistSegDbl(x2,y2,x3,y3,x4,y4) <= r*r + eps) return true;
    if (getPerpDistSegDbl(x3,y3,x1,y1,x4,y4) <= r*r + eps) return true;
    return false;
}

int main() {
    while (cin >> x1 >> y1, (x1 || y1)) {
        cin >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> r;
        if (isB()) cout << "b" << endl;
        else if (isA()) cout << "a" << endl;
        else if (isC()) cout << "c" << endl;
        else cout << "d" << endl;
    }
    return 0;
}