#include <iostream>
using namespace std;

char mark[4] = "dox";
string ss;

int check(){
    for(int h = 1; h <= 2; h++){
        for(int i = 0; i < 3; i++){
            int j;
            for(j = 0; j < 3; j++){
                if( ss[i*3+j] != mark[h] ) break;
            }
            if(j == 3) return h;
            for(j = 0; j < 3; j++){
                if( ss[j*3+i] != mark[h] ) break;
            }
            if(j == 3) return h;
        }
        int c;
        for(c = 0; c < 3; c++){
            if( ss[4*c] != mark[h] ) break;
        }
        if( c == 3 ) return h;
        for(c = 0; c < 3; c++){
            if( ss[2+2*c] != mark[h] ) break;
        }
        if( c == 3 ) return h;
    }
    return 0;
}

int main(){
    while( cin >> ss ){
        int r = check();
        cout << mark[ r ] << endl;
    }
    return 0;
}