//ようこ
#include<iostream>
#include<string>
using namespace std;

string n;

int sw(int a,int b,int c,int ans){
	if(n[a] == n[b] && n[b] == n[c]){
		if(n[a] == 'o'){return 1;}
		if(n[a] == 'x'){return 0;}
	}
	return ans != -1 ? ans : -1;
}
int main(void){
	while(cin>>n){
		int ans = -1;
		ans=sw(0,1,2,ans);
		ans=sw(3,4,5,ans);
		ans=sw(6,7,8,ans);
		ans=sw(0,4,8,ans);
		ans=sw(2,4,6,ans);
		ans=sw(0,3,6,ans);
		ans=sw(1,4,7,ans);
		ans=sw(2,5,8,ans);
		
		if(ans == 0)cout<<'x';
		else if(ans == 1)cout<<'o';
		else cout<<"d"; 
		cout<<endl;
	}
}