#include <iostream>
#include <string>
using namespace std;
#define loop(i,a,b) for(int i=a; i<(int)(b); i++)
#define rep(i,n) loop(i,0,n)

bool win(const string & s, char c){
    rep(j, 3){
        if (s[3 * j] == c && s[3 * j + 1] == c && s[3 * j + 2] == c) return true;
        if (s[j] == c && s[3 + j] == c && s[6 + j] == c) return true;
    }
    if ((s[0] == c&&s[8] == c) || (s[2] == c&&s[6] == c)){
        return s[4] == c;
    }
    return false;
}

int main(){
    string s;
    while (cin >> s){
        char ans;
        if (win(s, 'o')) ans = 'o';
        else if (win(s, 'x')) ans = 'x';
        else ans = 'd';
        cout << ans << endl;
    }
}