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

bool judge(string s, char c){
	for(int i = 0; i < 3; i++){
		if(s[3*i] == c && s[3*i+1] == c && s[3*i+2] == c){
			return true;
		}
		if(s[i] == c && s[i+3] == c && s[i+6] == c){
			return true;
		}
	}
	if(s[0] == c && s[4] == c && s[8] == c){
		return true;
	}
	if(s[2] == c && s[4] == c && s[6] == c){
		return true;
	}
	return false;
}
int main(){
	string s;
	while(getline(cin,s)){
		if(judge(s,'o')){
			cout << 'o' << endl;
		}else if(judge(s,'x')){
			cout << 'x' << endl;
		}else {
			cout << 'd' << endl;
		}
	}
	return 0;
}