#include <iostream>
#include <string>

using namespace std;

int main() {
  string str;
  int i = 0;
  int data[3][3];
  while(getline(cin, str)) {
    for(int i = 0; i < str.length(); i++) {
      switch(str[i]) {
      case 'o': data[i/3][i%3] = 1;  break;
      case 'x': data[i/3][i%3] = -1; break;
      case 's': data[i/3][i%3] = 0; break;
      }
    }
    int flag = 0;
    for(int i = 0; i < 3; i++) {
      int kind;
      for(int j = 0; j < 3; j++) {
	if(data[i][j] == 0) break;
	if(j == 0) kind = data[i][j];
	else {
	  if(data[i][j] != kind) break;
	  else if(j == 2) flag = kind;
	}
      }
    }
    if(flag == 0) {
      for(int i = 0; i < 3; i++) {
	int kind;
	for(int j = 0; j < 3; j++) {
	  if(data[j][i] == 0) break;
	  if(j == 0) kind = data[j][i];
	  else {
	    if(data[j][i] != kind) break;
	    else if(j == 2) flag = kind;
	  }
	}
      }
      if(flag == 0) {
	if(data[0][0] == data[1][1] && data[0][0] == data[2][2]
	   && data[0][0] != 0) {
	  flag = data[0][0];
	} else if(data[2][0] == data[1][1] && data[2][0] == data[0][2]
		  && data[2][0] != 0) {
	  flag = data[2][0];
	}
      }
    }
    switch(flag) {
    case 0: cout << 'd' << endl; break;
    case 1: cout << 'o' << endl; break;
    case -1: cout << 'x' << endl; break;
    }
  }
  return 0;
}