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

int main() {

  string input;

  while( getline( cin, input ) ) {

    int map[3][3] = {0};

    for ( int i = 0; i < 9; i++ ) {

      if ( input[i] == 'o' ) {
	map[i%3][i/3] = 1;
      }else if ( input[i] == 'x' ) {
	map[i%3][i/3] = 4;
      }

    }

    int ans = 0;
    int cnt = 0;

    for ( int i = 0; i < 3; i++ ) {
      cnt = 0;
      for ( int j = 0; j < 3; j++ ) {
	cnt += map[j][i];
      }
      if ( cnt == 3 ) ans = 1;
      if ( cnt == 12 ) ans = 2;
    }

    for ( int i = 0; i < 3; i++ ) {
      cnt = 0;
      for ( int j = 0; j < 3; j++ ) {
	cnt += map[i][j];
      }
      if ( cnt == 3 ) ans = 1;
      if ( cnt == 12 ) ans = 2;
    }

    cnt = 0;
    for ( int i = 0; i < 3; i++ ) {
      cnt += map[i][2-i];
    }
    if ( cnt == 3 ) ans = 1;
    if ( cnt == 12 ) ans = 2;

    cnt = 0;
    for ( int i = 0; i < 3; i++ ) {
      cnt += map[i][i];
    }
    if ( cnt == 3 ) ans = 1;
    if ( cnt == 12 ) ans = 2;

    if ( ans == 0 ) {
      cout << "d";
    }else if ( ans == 1 ) {
      cout << "o";
    }else {
      cout << "x";
    }
    cout << endl;

  }

  return 0;

}