#include <iostream> 
#include <sstream> 
#include <iomanip> 
#include <algorithm> 
#include <cmath> 
#include <string> 
#include <vector> 
#include <list> 
#include <queue> 
#include <stack> 
#include <set> 
#include <map> 
#include <bitset> 
#include <numeric> 
#include <climits> 
#include <cfloat> 
using namespace std; 

class Point
{
public:
    int y, x;
    Point(){
        y = x = 0;
    }
    Point(int y0, int x0){
        y = y0;
        x = x0;
    }
    Point operator+(const Point& p) const{
        return Point(y + p.y, x + p.x);
    }
    Point operator-(const Point& p) const{
        return Point(y - p.y, x - p.x);
    }
    Point operator*(int a) const{
        return Point(y * a, x * a);
    }
    double length2() const{
        return y * y + x * x;
    }
    double dist2(const Point& p) const{
        return (y - p.y) * (y - p.y) + (x - p.x) * (x - p.x);
    }
    int dot(const Point& p) const{
        return y * p.y + x * p.x; // |a|*|b|*cosÆ
    }
    int cross(const Point& p) const{
        return x * p.y - y * p.x; // |a|*|b|*sinÆ
    }
};

int segmentCircleCollide(const Point& a1, const Point& a2, const Point& c, int r)
{
    int num = 0;
    if(a1.dist2(c) < r * r)
        ++ num;
    if(a2.dist2(c) < r * r)
        ++ num;
    if(num == 2)
        return -1;
    if(num == 1)
        return 1;
    if((a2 - a1).dot(c - a1) > 0 && (a1 - a2).dot(c - a2) > 0){
        int s = (a2 - a1).cross(c - a1);
        int t = r * r * (a2 - a1).length2();
        if(s * s == t)
            return 1;
        if(s * s < t)
            return 2;
    }
    return 0;
}

bool convexContain(const vector<Point>& cp, const Point& p)
{
    int n = cp.size();
    bool ret1 = true;
    bool ret2 = true;
    for(int i=0; i<n; ++i){
        int a = (cp[(i+1)%n] - cp[i]).cross(p - cp[i]);
        if(a < 0)
            ret1 = false;
        if(a > 0)
            ret2 = false;
    }
    return ret1 || ret2;
}

int main()
{
    for(;;){
        vector<Point> p(3);
        for(int i=0; i<3; ++i){
            cin >> p[i].x >> p[i].y;
            if(p[i].x == 0)
                return 0;
        }

        Point c;
        int r;
        cin >> c.x >> c.y >> r;

        char ret = 'd';
        int num = 0;
        for(int i=0; i<3; ++i){
            if(p[i].dist2(c) <= r * r)
                ++ num;
        }
        if(num == 3)
            ret = 'b';
        else if(num > 0)
            ret = 'c';

        if(ret == 'd'){
            if(convexContain(p, c))
                ret = 'a';
            for(int i=0; i<3; ++i){
                int tmp = segmentCircleCollide(p[i], p[(i+1)%3], c, r);
                if(ret == 'd' && tmp > 0)
                    ret = 'c';
                if(ret == 'a' && tmp == 2)
                    ret = 'c';
            }
        }

        cout << ret << endl;
    }
}