#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>

typedef long long int ll;


using namespace std;

string s;

char calc(){
	if(s[4]!='s'){
		if((s[0]==s[4]&&s[4]==s[8])||(s[2]==s[4]&&s[4]==s[6])){
			return s[4];
		}
	}
	for(int i=0; i<3; i++){
		if(s[i*3]=='s')continue;
		if(s[i*3]==s[i*3+1]&&s[i*3]==s[i*3+2])return s[i*3];
	}
	for(int i=0; i<3; i++){
		if(s[i]=='s')continue;
		if(s[i]==s[i+3]&&s[i]==s[i+6])return s[i];
	}
	return 'd';
}

int main(){
	while(cin>>s){
		cout<<calc()<<endl;
	}
}