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

int main()
{
	string s;
	char result;
	int i,j;
	while (cin>>s) {
		result = 'd';
		for(i = 0; i < 3; i++) if (s[3*i]==s[3*i+1] && s[3*i]==s[3*i+2] && s[3*i]!='s') result = s[3*i];
		for(i = 0; i < 3; i++) if (s[i]==s[i+3] && s[i]==s[i+6] && s[i]!='s') result = s[i];
		if (s[0]==s[4] && s[0]==s[8] && s[0]!='s') result = s[0];
		if (s[2]==s[4] && s[2]==s[6] && s[2]!='s') result = s[2];
		cout<<result<<endl;
	}
	return 0;
}