#include <iostream>

int main(){
  char c[9];
  while(std::cin>>c){
    if(std::cin.eof())break;
    bool f=true;
    for(int i=0;i<3;i++){
      if(c[i*3]==c[i*3+1]&&c[i*3]==c[i*3+2])
	{if(c[i*3]!='s'){std::cout<<c[i*3]<<std::endl;f=false;break;}}
      if(c[i]==c[i+3]&&c[i]==c[i+6])
	{if(c[i]!='s'){std::cout<<c[i]<<std::endl;f=false;break;}}
    }
    if(c[0]==c[4]&&c[0]==c[8])
      {if(c[0]!='s'){std::cout<<c[0]<<std::endl;f=false;continue;}}
    if(c[2]==c[4]&&c[2]==c[6])
      {if(c[2]!='s'){std::cout<<c[2]<<std::endl;f=false;continue;}}
    if(f)std::cout<<'d'<<std::endl;
  }
  return 0;
}