#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;

double D(double x, double y){
	return sqrt(x * x + y * y);
}

double inp(double x1, double x2, double y1, double y2){
	return x1 * x2 + y1 * y2;
}

int main(){
	int x1, y1, x2, y2, x3, y3, x4, y4, r;
	while( cin >> x1 >> y1 , x1 || y1 ){
		cin >> x2 >> y2 >> x3 >> y3 >> x4 >> y4 >> r;
		x1 -= x4; x2 -= x4; x3 -= x4;
		y1 -= y4; y2 -= y4; y3 -= y4;
		
		double d = max(D(x1, y1), max(D(x2, y2), D(x3, y3)));
		if( d <= r ){
			puts("b");
		}else{
			double d1, d2, d3;
			if(D(x1, y1) < inp(x1, x2, y1, y2) || D(x2, y2) < inp(x1, x2, y1, y2) ){
				d1 = D(x1, y1);
			}else{
				d1 = fabs(x1 * y2 - y1 * x2) / D(x2 - x1, y2 - y1);
			}
			if(D(x2, y2) < inp(x2, x3, y2, y3) || D(x3, y3) < inp(x2, x3, y2, y3) ){
				d2 = D(x2, y2);
			}else{
				d2 = fabs(x2 * y3 - y2 * x3) / D(x3 - x2, y3 - y2);
			}
			if(D(x3, y3) < inp(x3, x1, y3, y1) || D(x1, y1) < inp(x3, x1, y3, y1) ){
				d3 = D(x3, y3);
			}else{
				d3 = fabs(x3 * y1 - y3 * x1) / D(x1 - x3, y1 - y3);
			}
			double d = min(d1, min(d2, d3));
			int t = (x1 * y2 > y1 * x2) + (x2 * y3 > y2 * x3) + (x3 * y1 > y3 * x1);
			bool in = !(t && (t-3));
			
			if( in ){
				if( d < r ){
					puts("c");
				}else{
					puts("a");
				}
			}else{
				if( d <= r ){
					puts("c");
				}else{
					puts("d");
				}
			}
		} 
	}
}