#include<iostream>
using namespace std;
int main(){
  string s;
  int field[3][3];
  while(cin >>s){
    int ans = 0;
    for(int i=0; i<s.size(); i++){
      if(s[i] == 'o') field[i%3][i/3] = 1;
      if(s[i] == 'x') field[i%3][i/3] = 2;
      if(s[i] == 's') field[i%3][i/3] = 0;
    }
    for(int i=0; i<3; i++){
      if(field[0][i] == field[1][i] && field[1][i] == field[2][i]) ans = field[0][i];
      if(field[i][0] == field[i][1] && field[i][1] == field[i][2]) ans = field[i][0];
    }
    if(field[0][0] == field[1][1] && field[1][1] == field[2][2]) ans = field[0][0];
    if(field[2][0] == field[1][1] && field[1][1] == field[0][2]) ans = field[2][0];
    if(ans == 0) cout <<"d"<<endl;
    if(ans == 1) cout <<"o"<<endl;
    if(ans == 2) cout <<"x"<<endl;
  }
  return 0;
}