#include<iostream>
#include<stdio.h>
#include<cmath>

#define SAME_SIGN( a , b ) a * b > 0

namespace geometry{

	#define EPS 1E-10

	struct point{
		double x;
		double y;
		point(){}
		point( double x , double y ):x(x),y(y){}
		point& operator += ( const point& p ){ x += p.x; y += p.y; return *this; }
		point& operator -= ( const point& p ){ x -= p.x; y -= p.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& p ) const { return (std::abs(x - p.x) < EPS && std::abs(y - p.y) < EPS); }
		bool operator != ( const point& p ) const { return !(*this == p); }
		double norm() const{ return sqrt( pow( x , 2) + pow( y , 2 ) ); }
	};

	typedef point vector2d;

	struct circle{
		point center;
		double radius;
	};

	struct triangle{
		point a;
		point b;
		point c;
	};

	point operator + ( const point& p1 , const point& p2 ){
			point p(p1);
			p += p2;
			return p;
		}
		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 * ( double factor , const point& p1 ){
			point p(p1);
			p *= factor;
			return p;
		}
		point operator / ( const point& p1 , double factor ){
			point p(p1);
			p /= factor;
			return p;
		}

	std::istream& operator >> ( std::istream& s , point& p )
	{
		return s >> p.x >> p.y;
	}

	double get_distance( const point& p1 , const point& p2 )
	{
		return sqrt( pow( p1.x - p2.x , 2 ) + pow( p1.y - p2.y , 2 ) );
	}

	double get_dot_product( const point& a , const point& b , const point& o )
	{
		vector2d oa = a - o;
		vector2d ob = b - o;
		return oa.x * ob.x + oa.y * ob.y;
	}

	double get_cross_product( const point& a , const point& b , const point& o )
	{
		vector2d oa = a - o;
		vector2d ob = b - o;
		return oa.x * ob.y - oa.y * ob.x;
	}

	point get_project( const point& s , const point& e , const point& p ){
		double scale = get_dot_product( s , e , p ) / ( e - s ).norm();
		return s + scale * ( e - s ) / ( e - s ).norm();
	}

	bool is_inter_point( const point& s , const point& e , const point& p ){
		return std::abs(get_distance( s , p ) + get_distance( e , p ) - get_distance( s , e )) < EPS;
	}
}

using namespace geometry;

bool input_data( triangle& tri , circle& cir )
{
	std::cin >> tri.a;
	if( tri.a.x == 0 && tri.a.y == 0 ){
		return false;
	}
	std::cin >> tri.b;
	if( tri.b.x == 0 && tri.b.y == 0 ){
		return false;
	}
	std::cin >> tri.c;
	if( tri.c.x == 0 && tri.c.y == 0 ){
		return false;
	}
	std::cin >> cir.center;
	if( cir.center.x == 0 && cir.center.y == 0 ){
		return false;
	}
	std::cin >> cir.radius;
	return true;
}

bool is_overlap_for_one_side( const point& p1 , const point& p2 , circle& cir )
{
	if( is_inter_point( p1 , p2 , get_project( p1 , p2 , cir.center )) ){
		if( get_distance( get_project( p1 , p2 , cir.center ) , cir.center ) <= cir.radius ){
			return true;
		}
		else{
			return false;
		}
	}
	else{
		return false;
	}
}

bool is_overlap( triangle& tri , circle& cir )
{
	// オーバーラップなし、あるいは円が三角形に完全に含まれる場合にfalse
	if( !(is_overlap_for_one_side( tri.a , tri.b , cir )) &&
		!(is_overlap_for_one_side( tri.b , tri.c , cir )) &&
		!(is_overlap_for_one_side( tri.c , tri.a , cir ))
		){
			return false;
	}
	else{
		return true;
	}

}

void output_positional_relation_of_circle_and_triangle( triangle& tri , circle& cir )
{
	if( get_distance( tri.a , cir.center ) <= cir.radius &&
		get_distance( tri.b , cir.center ) <= cir.radius &&
		get_distance( tri.c , cir.center ) <= cir.radius
		){
			std::cout << 'b' << std::endl;
	}
	else{
		if( get_distance( tri.a , cir.center ) > cir.radius &&
			get_distance( tri.b , cir.center ) > cir.radius &&
			get_distance( tri.c , cir.center ) > cir.radius
			){
				if( !(is_overlap( tri , cir )) ){
					if( SAME_SIGN( get_cross_product( tri.a , tri.b , cir.center ) , get_cross_product( tri.b , tri.c , cir.center ) ) &&
						SAME_SIGN( get_cross_product( tri.b , tri.c , cir.center ) , get_cross_product( tri.c , tri.a , cir.center ) )
						){
							std::cout << 'a' << std::endl;
					}
					else{
						std::cout << 'd' << std::endl;
					}
				}
				else{
					std::cout << 'c' << std::endl;
				}
		}
		else{
			std::cout << 'c' << std::endl;
		}
	}
}

int main(void)
{
	triangle tri;
	circle cir;

	while(input_data(tri, cir)){
		output_positional_relation_of_circle_and_triangle( tri , cir );
	}

	return 0;
}