import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

int[][] J;

static this()
{
    foreach(i;0..3) J~=[i*3,i*3+1,i*3+2];
    foreach(i;0..3) J~=[i,i+3,i+6];
    foreach(i;0..2) J~=[i*2,4,8-i*2];
}

char solve(char[] s)
{
    foreach(c;"ox")
        foreach(a;J)
            if(a.map!(i=>s[i]==c).all!"a"())
                return c;
    return 'd';
}

void main()
{
    foreach(s;stdin.byLine())
        writeln(solve(s));
}