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

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
string str;
char board[3][3];
bool flag1;//丸の勝利
bool flag2;//罰の勝利
void check(){
	for(int i = 0;i < 3;i++){//縦方向
		if(board[i][0]!='s'&&board[i][0]==board[i][1]&&board[i][0]==board[i][2]){
			cout <<board[i][0]<<endl;
			return;
		}
	}
	for(int j = 0;j < 3;j++){//縦方向
		if(board[0][j]!='s'&&board[0][j]==board[1][j]&&board[1][j]==board[2][j]){
			cout <<board[0][j]<<endl;
			return;
		}
	}
	if(board[0][0]!='s'&&board[0][0]==board[1][1]&&board[0][0]==board[2][2]){//右斜め方向
		cout <<board[0][0]<<endl;
		return ;

	}
	if(board[0][2]!='s'&&board[0][2]==board[1][1]&&board[0][2]==board[2][0]){//左斜め方向
		cout <<board[0][2]<<endl;
		return ;
	}
	cout <<"d"<<endl;
}

int main(){
	while(cin>>str){
		int k = 0;
		for(int i = 0;i < 3;i++){
			for(int j = 0;j < 3;j++){
				board[i][j] = str[k];
				k++;
			}
		}
		check();
	}
	return 0;
}