#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
#define FOR(i,a,b) for(int i=(a);i<(int)(b);i++)
#define rep(i,n) FOR(i,0,n)
#define ALL(x) (x).begin(), (x).end()
#define pb push_back

string s;

int main() {
    while(cin >> s) {
        //cout<<"s: "<<s<<endl;
        bool f = false;
        // tate 
        rep(i,3) {
            if(s[i] == 's') continue;
            if(s[i]==s[i+3] and s[i]==s[i+6]) {
                if(s[i]=='o') {cout<<"o"<<endl;}
                else {cout<<"x"<<endl;}
                f = true;
            }
        }

        // yoko
        for(int i=0; i<9; i+=3) {
            if(s[i]=='s') continue;
            if(s[i]==s[i+1] and s[i]==s[i+2]) {
                if(s[i]=='o') {cout<<"o"<<endl;}
                else {cout<<"x"<<endl;}
                f = true;
            }
        }

        // naname
        if(s[0]==s[4] and s[0]==s[8]) {
            if(s[0]=='o') {cout<<"o"<<endl;}
            else {cout<<"x"<<endl;}
            f = true;
        }
        if(s[2]==s[4] and s[2]==s[6]) {
            if(s[2]=='o') {cout<<"o"<<endl;}
            else {cout<<"x"<<endl;}
            f = true;
        }

        if(!f) cout << "d" << endl;
    }

    return 0;
}