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

int main(){
	string s;
	int board[ 9 ];

	while ( cin >> s ){
		for ( int i = 0; i < 9; ++i ){
			switch( s[ i ] ){
				case 'o': board[ i ] = 1; break;
				case 'x': board[ i ] = 2; break;
				case 's': board[ i ] = 0; break;
			}
		}

		int winner = 0;
		for ( int i = 0; i < 3; ++i ){
			if ( board[ i*3 + 0 ] && board[ i*3 + 0 ] == board[ i*3 + 1 ] && board[ i*3 + 0 ] == board[ i*3 + 2 ] ){
				winner = board[ i*3 + 0 ];
				break;
			}else if( board[ 0 + i ] && board[ 0 + i ] == board[ 3 + i ] && board[ 0 + i ] == board[ 6 + i ] ){
				winner = board[ 0 + i ];
				break;
			}
		}
		if ( !winner && board[ 4 ] && ( board[ 0 ] == board[ 4 ] && board[ 4 ] == board[ 8 ] ) || ( board[ 2 ] == board[ 4 ] && board[ 4 ] == board[ 6 ] ) ){
			winner = board[ 4 ];
		}

		switch ( winner ){
			case 0: cout << "d" << endl; break;
			case 1: cout << "o" << endl; break;
			case 2: cout << "x" << endl; break;
		}
	}
	return 0;
}