#include<iostream>
#include<string>
using namespace std;

string str;
int judge(int ch1, int ch2, int ch3){
	if(str[ch1]==str[ch2] &&str[ch2]==str[ch3]){
			if(str[ch1]=='o'){
				return 1;
			}else if(str[ch1]=='x'){
				return 2;
			}else{
				return 0;
			}
	}
	return 0;
}

int main(){
	int ans;
	while(cin>>str){
		do{
			if((ans = judge(0,1,2))!=0)break;
			if((ans = judge(3,4,5))!=0)break;
			if((ans = judge(6,7,8))!=0)break;
			if((ans = judge(0,3,6))!=0)break;
			if((ans = judge(1,4,7))!=0)break;
			if((ans = judge(2,5,8))!=0)break;
			if((ans = judge(0,4,8))!=0)break;
			if((ans = judge(2,4,6))!=0)break;
		}while(0);
		if(ans==1){
			cout<<"o\n";
		}else if(ans==2){
			cout<<"x\n";
		}else{
			cout<<"d\n";
		}
	}
	return 0;
}