#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  int dx[]={1,0};
  int dy[]={0,1};
  char a[3][3];
  while(cin>>a[0][0]) {
    REP(i,3)
      REP(j,3)
      if (i!=0||j!=0)
        cin >> a[j][i];
    int f = 0;
    REP(i,2) {
      int x = 0, y = 0;
      REP(j,3) {
        char b[3];
        if (dx[i]) x=0;
        if (dy[i]) y=0;
        REP(k,3) {
          b[k] = a[x][y];
          x += dx[i];
          y += dy[i];
        }
        if (b[0]=='o'&&b[1]=='o'&b[2]=='o') cout << 'o' << endl, f=1;
        if (b[0]=='x'&&b[1]=='x'&&b[2]=='x') cout << 'x' << endl, f=1;
        x += dx[i^1];
        y += dy[i^1];
      }
    }
    if (a[0][0]==a[1][1]&&a[1][1]==a[2][2]) {
      if (a[0][0]!='s')
        cout << a[0][0] << endl,f=1;
    }
    if (a[2][0]==a[1][1]&&a[1][1]==a[0][2]) {
      if (a[2][0]!='s')
        cout << a[2][0] << endl,f=1;
    }
    if(f==0) cout << 'd' << endl;
  }
      
}