#include <bits/stdc++.h>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define itrep(x) for(auto it=(x).begin();it!=(x).end();it++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vi vector<int>
#define INF (int)1e9
#define INFL 1e18
//#define MOD 1000000007
#define pb push_back
#define MP make_pair
#define PI 3.1415926535
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

int main(){
    string s;
    while(cin>>s){
        if((s[0]==s[1]&&s[1]==s[2])||(s[3]==s[4]&&s[4]==s[5])||(s[6]==s[7]&&s[8]==s[9])||(s[0]==s[3]&&s[3]==s[6])||(s[1]==s[4]&&s[4]==s[7])||(s[2]==s[5]&&s[5]==s[8])||(s[0]==s[4]&&s[4]==s[8])||(s[2]==s[4]&&s[4]==s[6])){
            if(s[5]=='o'||s[0]=='o'||s[8]=='o')cout<<'o'<<endl;
            else if(s[5]=='x'||s[0]=='x'||s[8]=='x')cout<<'x'<<endl;
        }else cout<<'d'<<endl;
        
    }
    
    return 0;
}

