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

int main(){
    string s;
    while(cin >> s){
        char res = 'd';
        for(int i=0; i<3; i++){
            int b=i*3;
            if(s[b]==s[b+1] && s[b]==s[b+2] && s[b]!='s') res = s[b];
            if(s[i]==s[i+3] && s[i]==s[i+6] && s[i]!='s') res = s[i];
        }
        if(s[4]!='s'){
            if((s[0]==s[4] && s[0]==s[8]) || (s[2]==s[4] && s[2]==s[6])){
                res = s[4];
            }
        }
        cout << res << endl;
    }
    return 0;
}

