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

char getC( char prev_c, int a, int b, int c, string s ){
	if( s[a] == s[b] && s[b] == s[c] && s[a] != 's' )
		return s[a];
	return prev_c;
}

int main()
{
	string s;
	while( cin >> s ){
		char c = 'd';
		for( int i = 0; i < 3; i++ )
			c = getC(c, i, i+3, i+6, s);
		for( int i = 0; i < 9; i += 3 )
			c = getC(c, i, i+1, i+2, s);
		c = getC(c, 0, 4, 8, s);
		c = getC(c, 2, 4, 6, s);
		cout << c << endl;
	}
	return 0;
}