process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(input){
    primeGenerator();
    var lines = input.trim().split('\n');
    var len = lines.length;
    for(var t=0;t<len;++t){
        var x1, y1, x2, y2, x3, y3, ox, oy, r;
        var maxX=0, maxY=0, minX=10000, minY=10000, d1, d2, d3;
        var dataset;
        
        dataset = lines[t].split(' ');
        x1 = parseInt(dataset[0]);
        y1 = parseInt(dataset[1]);
        if( x1 === 0 && y1 === 0 ) break;
        if( x1 > maxX ) maxX = x1;
        if( y1 > maxY ) maxY = y1;
        if( x1 < minX ) minX = x1;
        if( y1 < minY ) minY = y1;
        
        dataset = lines[++t].split(' ');
        x2 = parseInt(dataset[0]);
        y2 = parseInt(dataset[1]);
        if( x2 > maxX ) maxX = x2;
        if( y2 > maxY ) maxY = y2;
        if( x2 < minX ) minX = x2;
        if( y2 < minY ) minY = y2;
        dataset = lines[++t].split(' ');
        x3 = parseInt(dataset[0]);
        y3 = parseInt(dataset[1]);
        if( x3 > maxX ) maxX = x3;
        if( y3 > maxY ) maxY = y3;
        if( x3 < minX ) minX = x3;
        if( y3 < minY ) minY = y3;
        dataset = lines[++t].split(' ');
        ox = parseInt(dataset[0]);
        oy = parseInt(dataset[1]);
        r = parseInt(lines[t]);
        r = r * r;
        
        d1 = (x1 - ox) * (x1 - ox) + (y1 - ox) * (y1 - ox);
        d2 = (x2 - ox) * (x2 - ox) + (y2 - ox) * (y2 - ox);
        d3 = (x3 - ox) * (x3 - ox) + (y3 - ox) * (y3 - ox);
        
        if( d1 <= r && d2 <= r && d3 <= r ){
            console.log("b");
        }
        else if( d1 > r && d2 > r && d3 > r ){
            if( ox > minX && ox < maxX && oy > minY && oy < maxY ){
                console.log("a");
            }
            else{
                console.log("d");
            }
        }
        else{
            console.log("c");
        }
    }
});