#define	_USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include <set>
using namespace std;
int main(){
	
	string s;
	
	while(cin>>s){
		bool f=false;
		char c='\0';
		for(int i=0;i<3;i++){
			if(s[i]==s[i+3]&&s[i+3]==s[i+6]&&s[i]!='s'&&s[i+3]!='s'&&s[i+6]!='s'){
			//	cout<<"a"<<endl;
				c=s[i];
				f=true;
				break;
		}
		}
		for(int i=0;i<7;i=i+3){
			if(!f&&s[i]==s[i+1]&&s[i+1]==s[i+2]&&s[i]!='s'&&s[i+1]!='s'&&s[i+2]!='s'){
			//	cout<<"b"<<endl;
				c=s[i];
				f=true;
				break;
			}
		}
		if(!f&&s[0]==s[4]&&s[4]==s[8]&&s[0]!='s'&&s[4]!='s'&&s[8]!='s'){
			//cout<<"c"<<endl;
			c=s[0];
			f=true;
		}
		if(!f&&s[2]==s[4]&&s[4]==s[6]&&s[2]!='s'&&s[4]!='s'&&s[6]!='s'){
			//cout<<"d"<<endl;
			c=s[2];
			f=true;
		}
		if(!f)
			c='d';
		cout<<c<<endl;
	}
	
}