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

int main() {
	string a;
	while(cin >> a){
		if(a[0] == a[1] && a[0] == a[2] && a[0] != 's'){
			if(a[0] == 'o')
				cout << 'o' << endl;
			if(a[0] == 'x')
				cout << "x" << endl;
		}else if(a[3] == a[4] && a[3] == a[5] && a[3] != 's'){
			if(a[3] == 'o')
				cout << "o" << endl;
			if(a[3] == 'x')
				cout << "x" << endl;
		}else if(a[6] == a[7] && a[8] == a[7] && a[8] != 's'){
			if(a[6] == 'o')
				cout << "o" << endl;
			if(a[6] == 'x')
				cout << "x" << endl;
		}else if(a[0] == a[3] && a[0] == a[6] && a[0] != 's'){
			if(a[0] == 'o')
				cout << "o" << endl;
			if(a[0] == 'x')
				cout << "x" << endl;
		}else if(a[1] == a[4] && a[7] == a[4] && a[4] != 's'){
			if(a[4] == 'o')
				cout << "o" << endl;
			if(a[4] == 'x')
				cout << "x" << endl;
		}else if(a[2] == a[5] && a[8] == a[5] && a[5] != 's'){
			if(a[2] == 'o')
				cout << "o" << endl;
			if(a[2] == 'x')
				cout << "x" << endl;
		}else if(a[0] == a[4] && a[8] == a[4] && a[0] != 's'){
			if(a[0] == 'o')
				cout << 'o' << endl;
			if(a[0] == 'x')
				cout << "x" << endl;
		}else if(a[2] == a[4] && a[6] == a[4] && a[4] != 's'){
			if(a[4] == 'o')
				cout << 'o' << endl;
			if(a[4] == 'x')
				cout << "x" << endl;
		}else{
			cout << "d" << endl;
		}

		
	}
	

	return 0;
}


