#include<iostream>
 
using namespace std;
string s[3];
char judge(int i){
  int p = i;
  if(s[0][p] == s[1][p] && s[1][p] == s[2][p] && s[0][p] != 's'){
    return s[0][p];
  }
  if(s[0][p+1] == s[1][p+1] && s[1][p+1] == s[2][p+1] && s[0][p+1] != 's'){
    return s[0][p+1];
  }
  if(s[0][p+2] == s[1][p+2] && s[1][p+2] == s[2][p+2] && s[0][p+2] != 's'){
    return s[0][p+2];
  }
  if(s[0][p] == s[0][p+1] && s[0][p+1] == s[0][p+2] && s[0][p] != 's'){
    return s[0][p];
  }
  if(s[1][p] == s[1][p+1] && s[1][p+1] == s[1][p+2] && s[1][p] != 's'){
    return s[1][p];
  }
  if(s[2][p] == s[2][p+1] && s[2][p+1] == s[2][p+2] && s[2][p] != 's'){
    return s[2][p];
  }
  if(s[0][p] == s[1][p+1] && s[1][p+1] == s[2][p+2] && s[0][p] != 's'){
    return s[0][p];
  }
  if(s[0][p+2] == s[1][p+1] && s[1][p+1] == s[2][p] && s[0][p+2] != 's'){
    return s[0][p+2];
  }
  return 'd';
}
 
int main(){
  while(cin >> s[0]){
  cin >> s[1];
  cin >> s[2];
  for(int i=0;i<s[0].length();i+=3){
    cout << judge(i) << endl;
  }
  }
  return 0;
}