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++: /**************** Geometrical Library ****************/

#include<cmath>
#include<vector>
#include<algorithm>

#define	EPS	1e-9

enum {CCW=1,CW=-1,ON=0};

#define	mp	make_pair
#define	pb	push_back

using namespace std;

class Point{
public:
	double x,y;
	Point(){}
	Point(double xx,double yy):x(xx),y(yy){}
};

class Line:public vector<Point>{
public:
	Line(const Point &a,const Point &b){
		pb(a),pb(b);
	}
};

class Segment:public Line{
public:
	Segment(const Point &a,const Point &b):Line(a,b){}
};

class Polygon:public vector<Point>{};

class Circle{
public:
	Point c;
	double r;
	Circle(){}
	Circle(const Point &cc,double rr):c(cc),r(rr){}
};

Point &operator +=(Point &a,const Point &b){
	a.x+=b.x,a.y+=b.y;
	return a;
}

Point &operator -=(Point &a,const Point &b){
	a.x-=b.x,a.y-=b.y;
	return a;
}

Point &operator *=(Point &a,double c){
	a.x*=c,a.y*=c;
	return a;
}

Point &operator /=(Point &a,double c){
	a.x/=c,a.y/=c;
	return a;
}

Point operator +(const Point &a,const Point &b){
	Point c=a;
	return c+=b;
}

Point operator -(const Point &a,const Point &b){
	Point c=a;
	return c-=b;
}

Point operator *(double c,const Point &a){
	Point b=a;
	return b*=c;
}

Point operator /(const Point &a,double c){
	Point b=a;
	return b/=c;
}

bool operator <(const Point &a,const Point &b){
	return (a.x==b.x)?(a.y<b.y):(a.x<b.x);
}

bool operator >(const Point &a,const Point &b){
	return b<a;
}

double dot(const Point &a,const Point &b){
	return a.x*b.x+a.y*b.y;
}

double cross(const Point &a,const Point &b){
	return a.x*b.y-a.y*b.x;
}

double norm2(const Point &a){
	return dot(a,a);
}

int ccw(const Point &a,Point b,Point c){
	b-=a,c-=a;
	double rotdir=cross(b,c);
	if(rotdir>EPS)		return CCW;
	if(rotdir<-EPS)		return CW;
	return ON;
}

inline void calc_abc(const Line &l,double &a,double &b,double &c){	// l : ax+by+c=0
	a=l[0].y-l[1].y;
	b=l[1].x-l[0].x;
	c=l[0].x*l[1].y-l[1].x*l[0].y;
}

Point perp_foot(const Point &p,const Line &l){
	double a,b,c;
	calc_abc(l,a,b,c);
	return p-(a*p.x+b*p.y+c)/(a*a+b*b)*Point(a,b);
}

int intersect(const Circle &c,const Line &l,Point *p=NULL,Point *q=NULL){
	Point m=perp_foot(c.c,l);
	double d2=norm2(c.c-m);
	if(c.r*c.r+EPS<d2)	return 0;
	else if(abs(c.r*c.r-d2)<EPS){
		if(p&&q)	*p=*q=m;
		return 1;
	}
	else{
		if(p&&q){
			Point v;
			double n0=norm2(l[0]-m),n1=norm2(l[1]-m);
			if(n0<n1)	v=l[1]-m,n0=n1;
			else		v=l[0]-m;
			v*=sqrt((c.r*c.r-d2)/n0);
			*p=m+v,*q=m-v;
		}
		return 2;
	}
}

int intersect(const Circle &c,const Segment &s,Point *p=NULL,Point *q=NULL){
	Point pp,qq;
	int n=intersect(c,Line(s[0],s[1]),&pp,&qq);
	if(n==0)	return 0;
	else if(n==1){
		if(dot(pp-s[0],pp-s[1])<EPS){
			if(p&&q)	*p=*q=pp;
			return 1;
		}
		return 0;
	}
	else{
		bool bp=(dot(pp-s[0],pp-s[1])<EPS);
		bool bq=(dot(qq-s[0],qq-s[1])<EPS);
		if(bp&&bq){
			if(p&&q)	*p=pp,*q=qq;
			return 2;
		}
		if(bp||bq){
			if(p&&q)	*p=(bp?pp:qq);
			return 1;
		}
		return 0;
	}
}

/**************** Library END ****************/

#include<cstdio>

int main(){
	for(Point p,q,r;scanf("%lf%lf%lf%lf%lf%lf",&p.x,&p.y,&q.x,&q.y,&r.x,&r.y),p.x||p.y;){
		Circle c;	scanf("%lf%lf%lf",&c.c.x,&c.c.y,&c.r);

		int cnt=ccw(p,q,c.c)+ccw(q,r,c.c)+ccw(r,p,c.c);
		Point s=perp_foot(c.c,Line(p,q));
		Point t=perp_foot(c.c,Line(q,r));
		Point u=perp_foot(c.c,Line(r,p));
		if((cnt==3*CCW || cnt==3*CW)
		&& c.r*c.r<norm2(s-c.c)+EPS
		&& c.r*c.r<norm2(t-c.c)+EPS
		&& c.r*c.r<norm2(u-c.c)+EPS){
			puts("a");
			continue;
		}

		if(norm2(p-c.c)<c.r*c.r+EPS
		&& norm2(q-c.c)<c.r*c.r+EPS
		&& norm2(r-c.c)<c.r*c.r+EPS){
			puts("b");
			continue;
		}

		if(intersect(c,Segment(p,q))==0
		&& intersect(c,Segment(q,r))==0
		&& intersect(c,Segment(r,p))==0){
			puts("d");
			continue;
		}

		puts("c");
	}

	return 0;
}