#include <iostream>
#include <algorithm>

using namespace std;

int main(){

	while(1){
		char c[3][3];
		for(int i = 0; i < 3; i++){
			for(int j = 0; j < 3; j++){
				cin>>c[i][j];
			}
		}
		if(cin.eof())
			break;
		int r=-1;
		for(int i = 0; i < 3; i++){
			if(c[i][0]==c[i][1]&&c[i][0]==c[i][2]&&c[i][0]!='s'){
				if(c[i][0]=='o'){
					r=0;
					break;
				}
				else{
					r=1;
					break;
				}
			}
			if(c[0][i]==c[1][i]&&c[0][i]==c[2][i]&&c[0][i]!='s'){
				if(c[0][i]=='o'){
					r=0;
					break;
				}
				else{
					r=1;
					break;
				}
			}
		}
		if(r!=-1){
			if(r==0)
				cout<<'o'<<endl;
			else
				cout<<'x'<<endl;
		}
		else{
			if(c[0][0]==c[1][1]&&c[0][0]==c[2][2]&&c[0][0]!='s'){
				cout<<c[0][0]<<endl;
			}
			else if(c[0][2]==c[1][1]&&c[0][2]==c[2][0]&&c[1][1]!='s'){
				cout<<c[1][1]<<endl;
			}
			else
				cout<<'d'<<endl;
		}
	}
	
	return 0;
}