#include <iostream>
using namespace std;
int main()
{
	int i;
	char s[10], r;
	bool f;
	while (cin >> s)
	{
		f = false;
		for (i = 0; i < 3 && !f; i++)
		{
			if (s[i] != 's' && s[i] == s[i+3] && s[i] == s[i+6])
				r = s[i], f = true;
			else
				f = false;
		}
		if (f)
		{
			cout << r << endl;
			continue;
		}
		for (i = 0; i < 3 && !f; i++)
		{
			if (s[i*3] != 's' && s[i*3] == s[i*3+1] && s[i*3] == s[i*3+2])
				r = s[i], f = true;
			else
				f = false;
		}
		if (f)
		{
			cout << r << endl;
			continue;
		}
		if (s[0] != 's')
		{
			if (s[0] == s[4] && s[0] == s[8])
				r = s[0], f = true;
			else if (s[2] == s[4] && s[2] == s[6])
				r = s[2], f = true;
			else
				f = false;
		}
		if (f)
			cout << r << endl;
		else
			cout << "d" << endl;
	}
}