#include<iostream>
using namespace std;

int main(){
	char mas[3][3];
	while(cin >> mas[0][0]){
		cin >> mas[0][1] >> mas[0][2];
		for(int i=1;i<3;i++){
			for(int j=0;j<3;j++){
				cin >> mas[i][j];
			}
		}
		bool flg = true;
		for(int i=0;i<3;i++){
			if(mas[i][0]=='o' && mas[i][1]=='o' && mas[i][2]=='o'){
				cout << "o" << endl;
				flg = false;
			}
			else if(mas[i][0]=='x' && mas[i][1]=='x' && mas[i][2]=='x'){
				cout << "x" << endl;
				flg = false;
			}
		}
		for(int i=0;i<3;i++){
			if(mas[0][i]=='o' && mas[1][i]=='o' && mas[2][i]=='o'){
				cout << "o" << endl;
				flg = false;
			}
			else if(mas[0][i]=='x' && mas[1][i]=='x' && mas[2][i]=='x'){
				cout << "x" << endl;
				flg = false;
			}
		}
		if(mas[0][0]=='o' && mas[1][1]=='o' && mas[2][2]=='o'){
			cout << "o" << endl;
			flg = false;
		}
		if(mas[0][0]=='x' && mas[1][1]=='x' && mas[2][2]=='x'){
			cout << "x" << endl;
			flg = false;
		}
		if(mas[0][2]=='o' && mas[1][1]=='o' && mas[2][0]=='o'){
			cout << "o" << endl;
			flg = false;
		}
		if(mas[0][2]=='x' && mas[1][1]=='x' && mas[2][0]=='x'){
			cout << "x" << endl;
			flg = false;
		}
		if(flg) cout << "d" << endl;
	}
}