#include <iostream>
#include <string>

#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;

int main()
{
	string s;
	while(cin >> s)
	{
		bool flag = true;
		for(int i=0;i<7;i += 3)
		{
			if(s[i] != 's' && s[i] == s[i+1] && s[i+1] == s[i+2])
			{
				cout << s[i] << endl;
				flag = false;
				break;
			}
		}

		if(flag)
		{
			rep(i,3)
			{
				if(s[i] != 's' && s[i] == s[i+3] && s[i+3] == s[i+6])
				{
					cout << s[i] << endl;
					flag = false;
					break;
				}
			}
		}

		if(flag)
		{
			if(s[0] != 's' && s[0] == s[4] && s[4] == s[8])
			{
				cout << s[0] << endl;
				flag = false;
			}
		}

		if(flag)
		{
			if(s[2] != 's' && s[2] == s[4] && s[4] == s[6])
			{
				cout << s[2] << endl;
				flag = false;
			}
		}

		if(flag)
		{
			cout << "d" << endl;
		}
	}
	return 0;
}