#include <iostream>
#include <algorithm>
#include <cmath>
#include <cassert>
#include <vector>

using namespace std;

//-------------------------------------------------------------------------
// geometric library
 
namespace geometry {
 
#define EPS 1E-10 ///< 0とみなすサイズ。適当
 
    struct point {
        double x;
        double y;
 
		point() {}
		point(double x, double y) : x(x), y(y) {}
        point& operator += (const point& rhs) { x += rhs.x; y += rhs.y; return *this; }
        point& operator -= (const point& rhs) { x -= rhs.x; y -= rhs.y; return *this; }
        point& operator /= (double factor) { x /= factor; y /= factor; return *this; }
        point& operator *= (double factor) { x *= factor; y *= factor; return *this; }
        bool operator == (const point& rhs) const { return (std::abs(x - rhs.x) < EPS) && (std::abs(y - rhs.y) < EPS); }
        bool operator != (const point& rhs) const { return !(*this == rhs); }
        bool operator <= (const point& rhs) const { return x < rhs.x || (x == rhs.x && y <= rhs.y); }
        bool operator >= (const point& rhs) const { return x > rhs.x || (x == rhs.x && y >= rhs.y); }
        bool operator < (const point& rhs) const { return !(*this >= rhs); }
        bool operator > (const point& rhs) const { return !(*this <= rhs); }
		double arg() const { return atan2(y, x); }
        double norm() const { return sqrt(x * x + y * y); }
		point get_normal() const { return point(-y, x); }
    };
	typedef point vec2d;
 
    struct circle {
        point center;
        double radius;
		circle() {}
		circle(double x, double y, double r) : center(x, y), radius(r) {}
    };
 
	struct triangle {
		point p[3];
	};
 
    enum rotate_dir {
        rotate_None = 0,
        rotate_CW = 1,
        rotate_CCW = -1
    };
 
    point operator + (const point& p1, const point& p2)
    {
        point p(p1);
        p += p2;
        return p;
    }
 
    point operator / (const point& p1, double factor)
    {
        point p(p1);
        p /= factor;
        return p;
    }
  
    point operator * (const point& p1, double factor)
    {
        point p(p1);
        p *= factor;
        return p;
    }
 
    point operator * (double factor, const point& p1)
    {
        point p(p1);
        p *= factor;
        return p;
    }
 
    point operator - (const point& p1, const point& p2)
    {
        point p(p1);
        p -= p2;
        return p;
    }
 
    std::istream& operator >> (std::istream& is, point& p)
    {
        is >> p.x >> p.y;
        return is;
    }

    std::istream& operator >> (std::istream& is, circle& c)
    {
        is >> c.center >> c.radius;
        return is;
    }

    ///! 2点の距離
    double get_distance(const point& p1, const point& p2)
    {
        return sqrt(pow(p1.x - p2.x, 2) + pow(p1.y - p2.y, 2));
    }
 
    double cross_product(const point& p1, const point& p2)
    {
        return p1.x * p2.y - p2.x * p1.y;
    }
 
    double inner_product(const point& p1, const point& p2)
    {
        return p1.x * p2.x + p1.y * p2.y;
    }

	///! 直線s-eにpを投影した点を求める
	point get_project(const point& s, const point& e, const point& p)
	{
		double scale = inner_product(p - s, e - s) / (e - s).norm();
		return s + scale * (e - s) / (e - s).norm();
	}

     ///! pがs-e間(s,e上含む)にあればtrue
    bool is_inter_point(const point& s, const point& e, const point& p) {
        double d = get_distance(s, p) + get_distance(p, e) - get_distance(s, e);
        return abs(d) < EPS;
    }
 
    ///! p1-p2-p3が左右どちらの方向に折れているかを判定
    rotate_dir direction(const point& p1, const point& p2, const point& p3)
    {
        point p1_p3 = p1 - p3;
        point p2_p3 = p2 - p3;
        double cross = cross_product(p1_p3, p2_p3);
 
        if (std::abs(cross) < EPS) {
            return rotate_None;
        }
        else if (cross > 0) {
            return rotate_CW;
        }
        else {
            return rotate_CCW;
        }
    }

	bool is_inside_circle(const point& p, const circle& c)
	{
		return get_distance(p, c.center) <= c.radius + EPS;
	}

	bool is_inside_circle(const triangle& t, const circle& c)
	{
		for (int i = 0; i < 3; i++) {
			if (!is_inside_circle(t.p[i], c)) {
				return false;
			}
		}
		return true;
	}
 
    ///! (p1s, p1e)と(p2s, p2e)の線分交差判定.EPS以下で接している場合はtrue、重なっている場合はfalse
    bool intersect(const point& p1s, const point& p1e, const point& p2s, const point& p2e)
    {
        assert(p1s != p1e && p2s != p2e);
        return
            (direction(p1s, p1e, p2s) != direction(p1s, p1e, p2e)) &&
            (direction(p2s, p2e, p1s) != direction(p2s, p2e, p1e));
    }

	///! 円と三角形が交差するかどうか
	bool intersect(const circle& c, const triangle& t)
	{
		for (int i = 0; i < 3; i++) {
			point ps = t.p[i], pe = t.p [(i + 1) % 3];

			if (is_inside_circle(ps, c) != is_inside_circle(pe, c)) {
				return true;
			}
			if (is_inside_circle(ps, c) && is_inside_circle(pe, c)) {
				continue; // この辺は交差しない
			}
			point m = get_project(ps, pe, c.center);

			if (get_distance(m, c.center) <= c.radius + EPS && is_inter_point(ps, pe, m)) {
				return true;
			}
		}
		return false;
	} 

    ///! targetが三角形p1,p2,p3の内部にあるかどうか
    bool is_inside_triangle(const point& target, const point& p1, const point& p2, const point& p3)
    {
        point center_of_gravity = (p1 + p2 + p3) / 3; // 重心
 
        if (center_of_gravity == target) return true;
 
        // 重心とtargetを結んだ線分が三角形の辺と交叉するなら、点は三角形の外部にある
        bool intersect_any =
            intersect(p1, p2, center_of_gravity, target) ||
            intersect(p2, p3, center_of_gravity, target) ||
            intersect(p3, p1, center_of_gravity, target);
 
        return !intersect_any;
    }

	bool is_inside_triangle(const point& target, const triangle& t)
	{
		return is_inside_triangle(target, t.p[0], t.p[1], t.p[2]);
	}
 
	bool is_inside_triangle(const circle& c, const triangle& t)
	{
		if (!is_inside_triangle(c.center, t)) {
			return false;
		}
		for (int i = 0; i < 3; i++) {
			point m = get_project(t.p[i], t.p [(i + 1) % 3], c.center);

			if (get_distance(m, c.center) < c.radius - EPS) {
				return false;
			}
		}
		return true;
	}
 
} // namespace geometry


//-----------------------------------------------
//

using namespace geometry;

char solve(const triangle& triangle, const circle& circle) {
	if (is_inside_triangle(circle, triangle)) {
		return 'a';
	} else if (is_inside_circle(triangle, circle)) {
		return 'b';
	} else if (intersect(circle, triangle)) {
		return 'c';
	} else {
		return 'd';
	}
}

int main(void) {
	triangle triangle;
	circle circle;
	int n = 1;

	while (cin >> triangle.p[0]) {
		if (triangle.p[0].x == 0 && triangle.p[0].y == 0) {
			break;
		}
		cin >> triangle.p[1] >> triangle.p [2] >> circle;

		cout << solve(triangle, circle) << endl;
		n++;
	}
}

//-----------------------------------------------
// tests

static bool check_impl(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int r, char expect)
{
	triangle t;
	circle c;

	t.p[0].x = x1; t.p [0].y = y1;
	t.p[1].x = x2; t.p [1].y = y2;
	t.p[2].x = x3; t.p [2].y = y3;
	c.center.x = x4; c.center.y = y4;
	c.radius = r;

	char result = solve(t, c);
	return result == expect;
}

static void check(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int r, char expect)
{
	assert(check_impl(x1, y1, x2, y2, x3, y3, x4, y4, r, expect));
	assert(check_impl(x2, y2, x3, y3, x1, y1, x4, y4, r, expect));
	assert(check_impl(x3, y3, x1, y1, x2, y2, x4, y4, r, expect));
}

static void test()
{
	// 三角形が円に含まれる
	check(5, 5, 15, 5, 10, 10, 10, 10, 8, 'b');
	// 円が三角形に含まれる
	check(5, 5, 15, 5, 10, 20, 10, 10, 3, 'a');
	// 共通部分あり
	check(3, 12, 9, 3, 11, 12, 8, 7, 5, 'c');
	// 共通部分なし
	check(15, 3, 17, 7, 22, 5, 7, 6, 4, 'd');

	// 3頂点とも円周上
	check(5, 5, 15, 5, 10, 10, 10, 5, 5, 'b');
	// 2頂点が円周上、1頂点が円の外部
	check(5, 5, 15, 5, 10, 11, 10, 5, 5, 'c');
	// 2頂点が円周上、1頂点が円の内部
	check(5, 5, 15, 5, 10, 9, 10, 5, 5, 'b');
	// 1頂点が円周上、2頂点が円の外部
	check(15, 5, 20, 5, 20, 20, 10, 5, 5, 'c');
	// 1頂点が円周上、2頂点が円の内部
	check(15, 5, 20, 5, 20, 20, 10, 5, 5, 'c');

	// 円が3角形の内部、1辺が円に接している
	check(5, 5, 5, 20, 15, 20, 7, 15, 2, 'a');
	// 円が3角形の内部、2辺が円に接している
	check(5, 5, 5, 20, 30, 20, 8, 17, 3, 'a');
	// 円が3角形の外部、1辺が円に接している
	check(5, 5, 15, 5, 15, 25, 20, 20, 5, 'c');
}

Measured memory_bytes: 1216