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

const int N = 3;
string str;

char solve() {
  for(int j = 0; j < 2; ++j) {
    for(int k = 0; k <= N; ++k) {
      char c = '#';
      for(int l = 0; l < N; ++l) {
	int p;
	if(k == N) p = (N+(j*2-1))*l + (1-j)*(N-1);
	else p = (j*k+(1-j)*l)+((1-j)*k+(j*l))*N;
	if(str[p] == 's') break;
	if(c == '#') c = str[p];
	else if(str[p] != c) break;
	if(l+1 == N) return c;
      }
    }
  }
  return 'd';
}

int main() {
  while(cin >> str) cout << solve() << endl;
  return 0;
}