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

#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n)

string s;

char solve() {
  char res = 'd';
  rep(i,3) if (s[i*3] == s[i*3+1] && s[i*3+1] == s[i*3+2]) {
    if (s[i*3] == 'o') {
      res = 'o';
    } else if (s[i*3] == 'x') {
      res = 'x';
    }
  }
  
  rep(i,3) if (s[i] == s[i+3] && s[i+3] == s[i+6]) {
    if (s[i] == 'o') {
      res = 'o';
    } else if (s[i] == 'x') {
      res = 'x';
    }
  }
  
  if (s[0] == s[4] && s[4] == s[8]) {
    if (s[0] == 'o') {
      res = 'o';
    } else if (s[0] == 'x') {
      res = 'x';
    }
  }
  
  if (s[2] == s[4] && s[4] == s[6]) {
    if (s[2] == 'o') {
      res = 'o';
    } else if (s[2] == 'x') {
      res = 'x';
    }
  }
  return res;
}

int main (int argc, char const* argv[]) {
  while (cin>>s) {
    cout<<solve()<<endl;
  }
  return 0;
}