Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
	"strings"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		buf0 := strings.Split(scanner.Text(), " ")
		input0 := make([]int, 2)
		for i := range input0 {
			input0[i], _ = strconv.Atoi(buf0[i])
		}
		if input0[0] == 0 && input0[1] == 0 {
			break
		}
		a, b := input0[0], input0[1]
		scanner.Scan()
		buf1 := strings.Split(scanner.Text(), " ")
		input1 := make([]int, 2)
		for i := range input1 {
			input1[i], _ = strconv.Atoi(buf1[i])
		}
		c, d := input1[0], input1[1]
		scanner.Scan()
		buf2 := strings.Split(scanner.Text(), " ")
		input2 := make([]int, 2)
		for i := range input2 {
			input2[i], _ = strconv.Atoi(buf2[i])
		}
		e, f := input2[0], input2[1]
		scanner.Scan()
		buf3 := strings.Split(scanner.Text(), " ")
		input3 := make([]int, 2)
		for i := range input3 {
			input3[i], _ = strconv.Atoi(buf3[i])
		}
		g, h := input3[0], input3[1]
		scanner.Scan()
		r, _ := strconv.Atoi(scanner.Text())
		if (a-g)*(a-g)+(b-h)*(b-h) <= r*r && (c-g)*(c-g)+(d-h)*(d-h) <= r*r && (e-g)*(e-g)+(f-h)*(f-h) <= r*r {
			fmt.Println("b")
		} else if dist(a, b, c, d, g, h) > float64(r)-0.000001 && dist(a, b, e, f, g, h) > float64(r)-0.000001 && dist(e, f, c, d, g, h) > float64(r)-0.000001 && inclusive(a, b, c, d, e, f, g, h) {
			fmt.Println("a")
		} else if CL_intersect(a, b, c, d, g, h, r) || CL_intersect(a, b, e, f, g, h, r) || CL_intersect(e, f, c, d, g, h, r) {
			fmt.Println("c")
		} else {
			fmt.Println("d")
		}
	}
}

func CL_intersect(ax, ay, bx, by, cx, cy, r int) bool {
	acx := cx - ax
	acy := cy - ay
	bcx := cx - bx
	bcy := cy - by
	abx := bx - ax
	aby := by - ay
	if acx*acx+acy*acy >= r*r || bcx*bcx+bcy*bcy >= r*r {
		if abx*acx+aby*acy < 0 {
			if acx*acx+acy*acy <= r*r {
				return true
			}
		} else {
			if abx*acx+aby*acy > abx*abx+aby*aby {
				if bcx*bcx+bcy*bcy <= r*r {
					return true
				}
			} else if acx*acx+acy*acy-(abx*acx+aby*acy)*(abx*acx+aby*acy)/(abx*abx+aby*aby) <= r*r {
				return true
			}
		}
	}
	return false
}

func inclusive(ax, ay, bx, by, cx, cy, px, py int) bool {
	ok1 := true
	ok2 := true
	if (bx-ax)*(py-ay)-(px-ax)*(by-ay) < 0 {
		ok1 = false
	}
	if (bx-ax)*(py-ay)-(px-ax)*(by-ay) > 0 {
		ok2 = false
	}
	if (cx-bx)*(py-by)-(px-bx)*(cy-by) < 0 {
		ok1 = false
	}
	if (cx-bx)*(py-by)-(px-bx)*(cy-by) > 0 {
		ok2 = false
	}
	if (ax-cx)*(py-cy)-(px-cx)*(ay-cy) < 0 {
		ok1 = false
	}
	if (ax-cx)*(py-cy)-(px-cx)*(ay-cy) > 0 {
		ok2 = false
	}
	return ok1 || ok2
}

func dist(ax, ay, bx, by, px, py int) float64 {
	dx := float64(bx - ax)
	dy := float64(by - ay)
	A := float64(dx*dx + dy*dy)
	B := dx*float64(ax-px) + dy*float64(ay-py)
	t := -B / A
	if t < 0 {
		t = 0
	}
	if t > 1 {
		t = 1
	}
	tx := float64(ax) + dx*t
	ty := float64(ay) + dy*t
	return math.Sqrt((float64(px)-tx)*(float64(px)-tx) + (float64(py)-ty)*(float64(py)-ty))
}

C++: #include <bits/stdc++.h>
using namespace std;
using lint = long long;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;

using R = long double;
constexpr R pi = acos((R)-1), eps = 1e-8;

int sgn(R a) { return (a > eps) - (a < -eps); }
int sgn(R a, R b) { return sgn(a - b); }
using P = complex<R>;
istream& operator>>(istream& i, P& p) { R x, y; i >> x >> y; p = P(x, y); return i; }
ostream& operator<<(ostream& o, P p) { return o << fixed << setprecision(15) << real(p) << ' ' << imag(p); }
bool cmp(P p, P q) { return 2 * sgn(real(p), real(q)) + sgn(imag(p), imag(q)) < 0; }
bool eql(P p, P q) { return !cmp(p, q) and !cmp(q, p); }
R dot(P p, P q) { return real(conj(p) * q); }
R crs(P p, P q) { return imag(conj(p) * q); }
// -2: back, -1: cw, 0: on, 1: ccw, 2: front
int ccw(P p, P q) {
  int s = sgn(crs(p, q));
  if (s) return s;
  if (dot(p, q) < 0) return -2;
  if (dot(p, q - p) > 0) return 2;
  return 0;
}
int ccw(P o, P p, P q) { return ccw(p - o, q - o); }
struct L {
  P s, t;
  P vec() const { return t - s; }
  R abs() const { return std::abs(vec()); }
  R arg() const { return std::arg(vec()); }
};
int ccw(L s, P p) { return ccw(s.s, s.t, p); }

P proj(P p, L l) {
  P e = l.vec() / l.abs();
  return l.s + dot(p - l.s, e) * e;
}
P refl(P p, L l) { return (R)2 * proj(p, l) - p; }
R distPP(P p, P q) { return abs(q - p); }
R distPL(P p, L l) { return distPP(p, proj(p, l)); }
R distPS(P p, L s) {
  P q = proj(p, s);
  if (!ccw(s, q)) return distPP(p, q);
  return min(distPP(p, s.s), distPP(p, s.t));
}
R distLL(L l, L m) {
  if (sgn(crs(l.vec(), m.vec()))) return 0;
  return distPL(l.s, m);
}
R distLS(L l, L s) {
  if (ccw(l, s.s) * ccw(l, s.t) != 1) return 0;
  return min(distPL(s.s, l), distPL(s.t, l));
}
R distSS(L s, L t) {
  if (ccw(s, t.s) * ccw(s, t.t) <= 0 and ccw(t, s.s) * ccw(t, s.t) <= 0) return 0;
  return min({distPS(s.s, t), distPS(s.t, t), distPS(t.s, s), distPS(t.t, s)});
}
P intxn(L l, L m) {
  assert(sgn(crs(l.vec(), m.vec())));
  return l.s + crs(m.s - l.s, m.vec()) / crs(l.vec(), m.vec()) * l.vec();
}

using G = V<P>;
R area(const G& g) {
  if (g.size() < 3) return 0;
  R res = 0;
  P a = g.back();
  for (P b : g) {
    res += crs(a, b) / 2;
    a = b;
  }
  return res;
}
// -1: in, 0: on, 1: out
int contains(const G& g, P p) {
  assert(g.size() >= 3);
  int c = 0;
  P q = p + P(123 * pi, 456), a = g.back();
  for (P b : g) {
    if (!ccw(a, b, p)) return 0;
    if (!sgn(distLS({p, q}, {a, b}))) {
      c += ccw(p, q, intxn({p, q}, {a, b})) >= 0;
    }
    a = b;
  }
  return c & 1 ? -1 : 1;
}
G half_convex_hull(const V<P>& ps, bool strict) {
  G g;
  for (P p : ps) {
    while (g.size() >= 2) {
      int c = ccw(g[g.size() - 2], g.back(), p);
      if (c == 1 or !strict and c == 2) break;
      g.pop_back();
    }
    g.push_back(p);
  }
  g.pop_back();
  return g;
}
G convex_hull(V<P> ps, bool strict = true) {
  sort(begin(ps), end(ps), cmp);
  ps.erase(unique(begin(ps), end(ps), eql), end(ps));
  if (ps.size() < 3) return ps;
  G g = half_convex_hull(ps, strict);
  reverse(begin(ps), end(ps));
  G h = half_convex_hull(ps, strict);
  g.insert(end(g), begin(h), end(h));
  return g;
}
R diameter(const G& g) {
  auto e = minmax_element(begin(g), end(g), cmp);
  int n = g.size(), i = e.first - begin(g), j = e.second - begin(g);
  R res = 0;
  for (int _ = 0; _ < n; ++_) { // n: 半周, 2n: 一周
    res = max(res, distPP(g[i], g[j]));
    int ni = (i + 1) % n, nj = (j + 1) % n;
    if (sgn(crs(g[ni] - g[i], g[nj] - g[j])) < 0) i = ni;
    else j = nj;
  }
  return res;
}

struct C { P o; R r; };
V<P> intxnCL(C c, L l) {
  int s = sgn(distPL(c.o, l), c.r);
  if (s > 0) return {};
  P p = proj(c.o, l);
  if (!s) return {p};
  P q = sqrt(c.r * c.r - norm(p - c.o)) * l.vec() / l.abs();
  return {p - q, p + q};
}
V<P> intxnCC(C c, C d) {
  R a = distPP(c.o, d.o);
  if (!sgn(a)) {
    assert(sgn(c.r, d.r));
    return {};
  }
  P p = polar(c.r / a, acos((a * a + c.r * c.r - d.r * d.r) / (2 * a * c.r)));
  return {c.o + conj(p) * (d.o - c.o), c.o + p * (d.o - c.o)};
}

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);
  while (true) {
    P p; cin >> p;
    if (eql(p, {0, 0})) break;
    P q, r; cin >> q >> r;
    C c; cin >> c.o >> c.r;
    R pq = distPS(c.o, {p, q});
    R pr = distPS(c.o, {p, r});
    R qr = distPS(c.o, {q, r});
    if (sgn(max({distPP(c.o, p), distPP(c.o, q), distPP(c.o, r)}), c.r) <= 0) cout << 'b' << '\n';
    else if (contains({p, q, r}, c.o) <= 0 and sgn(c.r, min({pq, pr, qr})) <= 0) cout << 'a' << '\n';
    else if (contains({p, q, r}, c.o) == 1 and sgn(c.r, min({pq, pr, qr})) < 0) cout << 'd' << '\n';
    else cout << 'c' << '\n';
  }
}