#include <iostream>

using namespace std;

int main(){
  string tic;
  while(cin>>tic){
    char s = 'o';
    char ans = 'd';;
    for(int i=0;i<2;i++){
      if (tic[0]==s&&tic[1]==s&&tic[2]==s) ans = s;
      if (tic[3]==s&&tic[4]==s&&tic[5]==s) ans = s;
      if (tic[6]==s&&tic[7]==s&&tic[8]==s) ans = s;
      if (tic[0]==s&&tic[3]==s&&tic[6]==s) ans = s;
      if (tic[1]==s&&tic[4]==s&&tic[7]==s) ans = s;
      if (tic[2]==s&&tic[5]==s&&tic[8]==s) ans = s;
      if (tic[0]==s&&tic[4]==s&&tic[8]==s) ans = s;
      if (tic[2]==s&&tic[4]==s&&tic[6]==s) ans = s;
      s = 'x';
    }
    cout << ans << endl;
  }
  return 0;
}