#include<iostream>
#include<vector>
#include<string>
using namespace std;

int main(){
    string s;
    while(cin>>s){
        for(int i=0;i<7;i+=3){
            if(s[i]!='s'&&s[i]==s[i+1]&&s[i]==s[i+2]){
                cout<<s[i]<<endl;
                goto ne;
            }
        }
        for(int i=0;i<3;i++){
            if(s[i]!='s'&&s[i]==s[i+3]&&s[i]==s[i+6]){
                cout<<s[i]<<endl;
                goto ne;
            }
        }
        if(s[0]!='s'&&s[0]==s[4]&&s[0]==s[8]){
            cout<<s[0]<<endl;
            goto ne;
        }
        if(s[2]!='s'&&s[2]==s[4]&&s[2]==s[6]){
            cout<<s[2]<<endl;
            goto ne;
        }
        cout<<"d"<<endl;
    ne:;
    }
}