#include <iostream>
#include <math.h>
#inclide <map>
#include <algorithm>
#include <vector>
#include<string>
using namespace std;
#define pb push_back;
#define ll long long;
ll mod=1000000007;

int sum1;
int main{
string a;
while(cin>>a)
{bool owin=false;
bool xwin=false;
if(a[0]==a[1]&&a[1]==a[2]){
if(a[0]=='o'){owin=true;}
else{xwin=true;}
}
if(a[3]==a[4]&&a[5]==a[4]){
if(a[4]=='o'){owin=true;}
else{xwin=true;}
}
if(a[6]==a[7]&&a[7]==a[8]){
if(a[6]=='o'){owin=true;}
else{xwin=true;}
}
if(a[0]==a[4]&&a[4]==a[8]){
if(a[0]=='o'){owin=true;}
else{xwin=true;}
}
if(a[4]==a[6]&&a[4]==a[2]){
if(a[4]=='o'){owin=true;}
else{xwin=true;}
}
if(xwin){cout<<"o"<<endl;}
else if(xwin){cout<<"x"<<endl;}
else{cout<<"d"<<endl;}
}return 0;
}
