#include<bits/stdc++.h>
#define rep(i,n)for(ll i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main() {
	string s;
	while (cin >> s) {
		char ans = 'd';
		rep(i, 3)if (s[i] == s[i + 3] && s[i] == s[i + 6] && s[i] != 's')ans = s[i];
		for (int i = 0; i <= 6; i += 3)if (s[i] == s[i + 1] && s[i] == s[i + 2] && s[i] != 's')ans = s[i];
		if (s[0] == s[4] && s[0] == s[8] && s[0] != 's')ans = s[0];
		if (s[2] == s[4] && s[2] == s[6] && s[2] != 's')ans = s[2];
		cout << ans << endl;
	}
	return 0;
}