#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	while (cin >> s){
		if      (s[0] == s[1] && s[1] == s[2] && s[2] != 's')cout << s[0];
		else if (s[3] == s[4] && s[4] == s[5] && s[5] != 's')cout << s[3];
		else if (s[6] == s[7] && s[7] == s[8] && s[8] != 's')cout << s[7];
		else if (s[0] == s[3] && s[3] == s[6] && s[6] != 's')cout << s[0];
		else if (s[1] == s[4] && s[4] == s[7] && s[7] != 's')cout << s[1];
		else if (s[2] == s[5] && s[5] == s[8] && s[8] != 's')cout << s[2];
		else if (s[0] == s[4] && s[4] == s[8] && s[8] != 's')cout << s[0];
		else if (s[2] == s[4] && s[4] == s[6] && s[6] != 's')cout << s[2];
		else cout << 'd';
		cout << endl;
	}
}