#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
char board[3][3];

int main()
{
//	cut here before submit 
//	freopen ("testcase.TTT", "r", stdin );
	string str = "";
	while (cin >> str ){
		memset (board, 0, sizeof (board ) );
		rep (i, 9 ) board[i/3][i%3] = str[i];
		char win = 'd';
		rep (i, 3 ){
			if (board[i][0] != 's' && board[i][0] == board[i][1] && board[i][0] == board[i][2] ){
				win = board[i][0];
				break;		
			} //end if
		} // end rep
		rep (j, 3 ){
			if (board[0][j] != 's' && board[0][j] == board[1][j] && board[0][j] == board[2][j] ){
				win = board[0][j];		
				break;
			} //end if
		} // end rep
		if (board[0][0] != 's' && board[0][0] == board[1][1] && board[0][0] == board[2][2] ){
			win = board[0][0];
		} // end if
		if (board[0][2] != 's' && board[0][2] == board[1][1] && board[0][2] == board[2][0] ){
			win = board[0][2];
		} // end if
		cout << win << endl;
	} // end loop

	return 0;
}