#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
	char s[10],c[3]={'o','x','d'};
	int i,j,f;
	while(gets(s)!=NULL) {
		f=2;
		for (i=0;i<2;i++) {
			for (j=0;j<3;j++) {
				if ((s[j*3]==c[i] && s[j*3+1]==c[i] && s[j*3+1]==c[i]) || (s[j]==c[i] && s[j+3]==c[i] && s[j+6]==c[i]))  f=i;
               }
			if ((s[0]==c[i] && s[4]==c[i] && s[8]==c[i]) || (s[2]==c[i] && s[4]==c[i] && s[6]==c[i])) f=i;
		}
		cout << c[f] << endl;
	}
	return 0;
}