#include <iostream>
#include <string>

using namespace std;

void solve()
{
	string str;
	while(cin >> str)
	{
		if((str[0] == 'o' && str[1] == 'o' && str[2] == 'o') ||
		   (str[3] == 'o' && str[4] == 'o' && str[5] == 'o') ||
		   (str[6] == 'o' && str[7] == 'o' && str[8] == 'o') ||
		   (str[0] == 'o' && str[3] == 'o' && str[6] == 'o') ||
		   (str[1] == 'o' && str[4] == 'o' && str[7] == 'o') ||
		   (str[2] == 'o' && str[5] == 'o' && str[8] == 'o') ||
		   (str[0] == 'o' && str[4] == 'o' && str[8] == 'o') ||
		   (str[2] == 'o' && str[4] == 'o' && str[6] == 'o'))
		{
			cout << "o" << endl;
		}
		else if((str[0] == 'x' && str[1] == 'x' && str[2] == 'x') ||
			    (str[3] == 'x' && str[4] == 'x' && str[5] == 'x') ||
			    (str[6] == 'x' && str[7] == 'x' && str[8] == 'x') ||
			    (str[0] == 'x' && str[3] == 'x' && str[6] == 'x') ||
			    (str[1] == 'x' && str[4] == 'x' && str[7] == 'x') ||
			    (str[2] == 'x' && str[5] == 'x' && str[8] == 'x') ||
			    (str[0] == 'x' && str[4] == 'x' && str[8] == 'x') ||
			    (str[2] == 'x' && str[4] == 'x' && str[6] == 'x'))
		{
			cout << "x" << endl;
		}
		else
		{
			cout << "d" << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}