#include <iostream>
#include <string>
using namespace std;
int f(char a, char b, char c)
{
	if(a == b && b == c){
		if(a == 'o') return 1;
		else if(a == 'x') return 2;
	}
	return 0;
}

int main()
{
	string s;
	while(cin >> s){
		string t;
		int res = 0;
		for(int i = 0; i < 3 && res == 0; ++i){
			res = f(s[i*3],s[i*3+1],s[i*3+2]);
		}
		for(int i = 0; i < 3 && res == 0; ++i){
			res = f(s[i],s[i+3],s[i+6]);
		}
		if(res == 0){
			res = f(s[0],s[4],s[8]);
		}
		if(res == 0){
			res = f(s[2],s[4],s[6]);
		}
		cout << (res == 0 ? 'd' : res == 1 ? 'o' : 'x') << endl;
	}
}