#include<cstdio>
#include<cstring>
#include<algorithm>
#include<functional>
#include<vector>
#include<stack>
#include<queue>
#include<iostream>
using namespace std;
int main(void)
{
	char paro[8][10]={
			"ooossssss",
			"sssooosss",
			"ssssssooo",
			"ossossoss",
			"sossossos",
			"ssossosso",
			"ssosososs",
			"osssossso",
	};
	char parx[8][10]={
			"xxxssssss",
			"sssxxxsss",
			"ssssssxxx",
			"xssxssxss",
			"sxssxssxs",
			"ssxssxssx",
			"ssxsxsxss",
			"xsssxsssx",
	};
	char s[9],cpy[9];
	int tern,ff;
	while(scanf("%s",s)!=EOF) {
		tern=0;
		for(int i=0;i<9;i++) cpy[i]=s[i];
		cpy[9]='\0';
		for(int i=0;i<9;i++) if(cpy[i]=='x') cpy[i]='s';
		for(int i=0;i<8;i++){ 
			if(strcmp(paro[i],cpy)==0) {cout<<"o"<<endl;tern=1;break;};
		}
		ff=0;	
		if(tern==0) {
			for(int i=0;i<9;i++) cpy[i]=s[i];
			cpy[9]='\0';
			for(int i=0;i<9;i++) if(cpy[i]=='o') cpy[i]='s';
			for(int i=0;i<8;i++) 
				if(strcmp(parx[i],cpy)==0) {cout<<"x"<<endl;ff=1;break;};
		}
		if(tern==0 && ff==0) cout<<"d"<<endl;
	}
	
}
			
		
		
		
		
					