#include<iostream>
#include<string>
using namespace std;
int main(){
  string str;
  while(cin>>str){
    string tate[8];
    tate[0]="";tate[0]+=str[0];tate[0]+=str[3];tate[0]+=str[6];
    tate[1]="";tate[1]+=str[1];tate[1]+=str[4];tate[1]+=str[7];
    tate[2]="";tate[2]+=str[2];tate[2]+=str[5];tate[2]+=str[8];
    tate[3]="";tate[3]+=str[0];tate[3]+=str[1];tate[3]+=str[2];
    tate[4]="";tate[4]+=str[3];tate[4]+=str[4];tate[4]+=str[5];
    tate[5]="";tate[5]+=str[6];tate[5]+=str[7];tate[5]+=str[8];
    tate[6]="";tate[6]+=str[0];tate[6]+=str[4];tate[6]+=str[8];
    tate[7]="";tate[7]+=str[2];tate[7]+=str[4];tate[7]+=str[6];
    int flag=1;
    for(int i=0;i<8;i++){
      if(tate[i].compare("ooo")==0){
	flag=0;
	cout<<"o"<<endl;
	break;
      }else if(tate[i].compare("xxx")==0){
	flag=0;
	cout<<"x"<<endl;
	break;
      }
    }
    if(flag)
      cout<<"d"<<endl;
  }
  return 0;
}