#include<algorithm>
#include<iostream>
#include<string>
#include<cstdlib>
#include<cstring>
#include<cmath>
#define dis(p,q) ((p)*(p)+(q)*(q))
using namespace std;
int lc(double bx,double by,double ex,double ey,double cx,double cy,double cr){
  int p,q;
  if(0){
  }else if(dis(cx-bx,cy-by)>cr*cr){
    p=1;
  }else if(dis(cx-bx,cy-by)<cr*cr){
    p=0;
  }else{
    p=2;
  }
  if(0){
  }else if(dis(cx-ex,cy-ey)>cr*cr){
    q=1;
  }else if(dis(cx-ex,cy-ey)<cr*cr){
    q=0;
  }else{
    q=2;
  }
  if(p==0&&q==0)
    return 0;
  if(p!=1||q!=1)
    return 1;
  double vx,vy,px,py,qx,qy,rx,ry,ds;
  ds=sqrt(dis(bx-ex,by-ey));
  vx=(ex-bx)/ds;
  vy=(ey-by)/ds;
  ds=((ey-by)*cx+(bx-ex)*cy+(by-ey)*bx+(ex-bx)*by)/((ey-by)*vy-(bx-ex)*vx);
  px=cx-vy*ds;
  py=cy+vx*ds;
  if(0){
  }else if(cr>ds){
    ds=sqrt(cr*cr-ds*ds);
    qx=px+vx*ds;
    qy=py+vy*ds;
    rx=px-vx*ds;
    ry=py-vy*ds;
    if(bx==ex)
      return min(by,ey)<=min(qy,ry)&&max(qy,ry)<=max(by,ey);
    else
      return min(bx,ex)<=min(qx,rx)&&max(qx,rx)<=max(bx,ex);
  }else if(cr==ds){
    if(bx==ex)
      return min(by,ey)<=py&&py<=max(by,ey);
    else
      return min(bx,ex)<=px&&px<=max(bx,ex);
  }
  return 0;
}
int pt(double px,double py,double qx,double qy,double rx,double ry,double sx,double sy){
  if(((rx-qx)*(py-qy)-(px-qx)*(ry-qy)<=0&&(sx-rx)*(py-ry)-(px-rx)*(sy-ry)<=0&&(qx-sx)*(py-sy)-(px-sx)*(qy-sy)<=0)||
     ((rx-qx)*(py-qy)-(px-qx)*(ry-qy)>=0&&(sx-rx)*(py-ry)-(px-rx)*(sy-ry)>=0&&(qx-sx)*(py-sy)-(px-sx)*(qy-sy)>=0))
    return 1;
  return 0;
}
int main(){
  int i;
  int x[4],y[4],r;
  while(cin>>x[0]>>y[0]&&(x[0]||y[0])){
    for(i=1;i<4;i++)
      cin>>x[i]>>y[i];
    cin>>r;
    for(i=0;i<3;i++){
      if(lc(x[i],y[i],x[(i+1)%3],y[(i+1)%3],x[3],y[3],r))
	break;
    }
    if(i==3){
      if(dis(x[0]-x[3],y[0]-y[3])<r*r){
	cout<<"b"<<endl;
      }else{
	if(pt(x[3],y[3],x[0],y[0],x[1],y[1],x[2],y[2]))
	  cout<<"a"<<endl;
	else
	  cout<<"d"<<endl;
      }
    }else{
      cout<<"c"<<endl;
    }
  }
  return 0;
}