#include <bits/stdc++.h>

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair

#define loop(i,a,b) for(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)

const double EPS = 1e-8;
const double INF = 1e12;
typedef complex<double> P;
namespace std {
    bool operator < (const P& a, const P& b) {
        return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
    }
}
double cross(const P& a, const P& b) {
    return imag(conj(a)*b);
}
double dot(const P& a, const P& b) {
    return real(conj(a)*b);
}

struct L : public vector<P> {
    L(const P &a, const P &b) {
        push_back(a); push_back(b);
    }
};

typedef vector<P> G;

struct C {
    P p; double r;
    C(const P &p, double r) : p(p), r(r) { }
};

P projection(const L &l, const P &p) {
    double t = dot(p-l[0], l[0]-l[1]) / norm(l[0]-l[1]);
    return l[0] + t*(l[0]-l[1]);
}

double distanceLP(const L &l, const P &p) {
    return abs(p - projection(l, p));
}

int convex_contains(const G &gg, const P &p) {
    const int n = gg.size();
    P g = (gg[0] + gg[n/3] + gg[2*n/3]) / 3.0; // inner-point
    int a = 0, b = n;
    while (a+1 < b) { // invariant: c is in fan g-P[a]-P[b]
        int c = (a + b) / 2;
        if (cross(gg[a]-g, gg[c]-g) > 0) { // angle < 180 deg
            if (cross(gg[a]-g, p-g) > 0 && cross(gg[c]-g, p-g) < 0) b = c;
            else                                                  a = c;
        } else {
            if (cross(gg[a]-g, p-g) < 0 && cross(gg[c]-g, p-g) > 0) a = c;
            else                                                  b = c;
        }
    }
    b %= n;
    if (cross(gg[a] - p, gg[b] - p) < 0) return false;
    if (cross(gg[a] - p, gg[b] - p) > 0) return true;
    return false;
}

int main(){
    double x, y;
    while(cin >> x >> y, x+y){
        G g;
        g.push_back(P(x, y));
        for(int i=0; i< 2; i++){
            cin >> x >> y;
            g.push_back(P(x, y));
        }
        cin >> x >> y;
        double r;
        cin >> r;
        C c(P(x, y), r);
        if(convex_contains(g, c.p)){
            bool a = true;
            for(int i=0; i< 3; i++){
                L l(g[i], g[(i+1)%3]);
                if(!(c.r < distanceLP(l, c.p))) a = false;
            }
            if(a) cout << "a" << endl;
            else cout << "c" << endl;
        }
        else {
            bool b = true;
            for(int i=0; i< 3; i++){
                if(!(abs(g[i]-c.p) < c.r)) b = false;
            }
            if(b) cout << "b" << endl;
            else cout << "d" << endl;
        }
    }
}