#include <iostream>
#include <string>
using namespace std;

int main(){
  string m;
  while(cin>>m){
    string win = "d";
    for(int i=0;i<3;i++){
      if(m[i*3]!='s' && m[i*3]==m[i*3+1] && m[i*3+1]==m[i*3+2])
	win = m[i*3];
      if(m[ i ]!='s' && m[ i ]==m[ i+3 ] && m[ i+3 ]==m[ i+6 ])
	win = m[i];
    }
    
        if(m[4]!='s' && m[0]==m[4] && m[4]==m[8])
	  win = m[4];
        if(m[4]!='s' && m[2]==m[4] && m[4]==m[6])
	  win = m[4];
	
     
	cout<<win<<endl;
  }
  return 0;
}