#include<iostream>
#include<string>

using namespace std;

char s[3][3];

int judgeO(){
  for(int i = 0; i < 3; i++){
    if(s[i][0] == 'o' && s[i][1] == 'o' && s[i][2] == 'o') return 1;
  }
  for(int i = 0; i < 3; i++){
    if(s[0][i] == 'o' && s[1][i] == 'o' && s[2][i] == 'o') return 1;
  }
  if(s[0][0] == 'o' && s[1][1] == 'o' && s[2][2] == 'o') return 1;
  if(s[0][2] == 'o' && s[1][1] == 'o' && s[2][0] == 'o') return 1;

  return 0;
}

int judgeX(){
  for(int i = 0; i < 3; i++){
    if(s[i][0] == 'x' && s[i][1] == 'x' && s[i][2] == 'x') return 1;
  }
  for(int i = 0; i < 3; i++){
    if(s[0][i] == 'x' && s[1][i] == 'x' && s[2][i] == 'x') return 1;
  }
  if(s[0][0] == 'x' && s[1][1] == 'x' && s[2][2] == 'x') return 1;
  if(s[0][2] == 'x' && s[1][1] == 'x' && s[2][0] == 'x') return 1;

  return 0;
}


int main(){

  string a[3];
 
  while(cin >> a[0] >> a[1] >> a[2]){

  for(int i = 0; i <= a[0].length()-1; i+=3){

    for(int j = 0; j < 3; j++){
      for(int k = 0; k < 3; k++){
	s[j][k] = a[j][k+i];
      }
    }
    int x = judgeO();
    int y = judgeX();

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