#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

bool equal3( char &a, char &b, char &c )
{
	return a == b && b == c;
}

int idx[][3] = {
	0, 1, 2,
	3, 4, 5,
	6, 7, 8,
	0, 3, 6,
	1, 4, 7,
	2, 5, 8,
	0, 4, 8,
	2, 4, 6
};

void printRes( string buffer )
{
	for ( int i = 0; i < sizeof( idx ) / sizeof( idx[0] ); i++ )
	{
		if ( buffer[ idx[i][0] ] != 's' && equal3( buffer[ idx[i][0] ], buffer[ idx[i][1] ], buffer[ idx[i][2] ] ) )
		{
			cout << ( buffer[ idx[i][0] ] == 'o' ? 'o' : 'x' ) << endl;;
			return;
		}
	}

	cout << 'd' << endl;
	return;
}

int main()
{
	string buffer;

	while ( cin >> buffer )
	{
		printRes( buffer );
	}		

	return 0;
}