#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
int main(){
    string s;
    while (cin>>s) {
        vector<vector<char>>v(3,vc());
        int hoge=0;
        rep(i,3)rep(j,3){v[i].push_back(s[hoge++]);}
        bool flag=false;
        char win = '\0';
        rep(i,3)if((v[i][0]==v[i][1])&&v[i][0]==v[i][2]){if(v[i][1]=='s')continue;flag=true;win=v[i][1];}
        rep(i,3)if((v[0][i]==v[1][i])&&v[1][i]==v[2][i]){if(v[1][i]=='s')continue;flag=true;win=v[1][i];}
        if((v[0][0]==v[1][1])&&(v[1][1]==v[2][2])){if(v[1][1]=='s')continue;flag=true;win=v[1][1];}
        if(v[0][2]==v[1][1]&&v[1][1]==v[2][0]){if(v[1][1]=='s')continue;flag=true; win=v[1][1];}
        if(flag)cout<<win<<endl;
        else cout<<"d"<<endl;
    }
}