#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#include <stack>
#include <queue>

using namespace std;
typedef long long LL;
typedef pair<int, int> P;
static const double EPS = 1e-5;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
char out(int l[]){
  if(l[0]!='s'&&l[0]==l[3]&&l[3]==l[6]) return l[0];
  if(l[0]!='s'&&l[0]==l[4]&&l[4]==l[8]) return l[0];
  if(l[0]!='s'&&l[0]==l[1]&&l[1]==l[2]) return l[0];
  if(l[1]!='s'&&l[1]==l[4]&&l[4]==l[7]) return l[1];
  if(l[2]!='s'&&l[2]==l[5]&&l[5]==l[8]) return l[2];
  if(l[2]!='s'&&l[2]==l[4]&&l[4]==l[6]) return l[2];
  if(l[3]!='s'&&l[3]==l[4]&&l[4]==l[5]) return l[3];
  if(l[6]!='s'&&l[6]==l[7]&&l[7]==l[8]) return l[6];
  return 'd';
}
int main(void){
  string line;
  while(cin>>line){
    int s[9];
    REP(i,9)s[i]=line[i];
    cout<<out(s)<<endl;
  }
  return 0;
}