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

int main()
{
	char str[16];
	while(cin >> str)
	{
		int x,y,t,line[8]={0};
		for(int i=0; i<9; i++)
		{
			switch(str[i])
			{
				case 'o': t=+1; break;
				case 'x': t=-1; break;
				case 's': t= 0; break;
			}

			line[i/3] += t;
			line[i%3+3] += t;
			
			if(i/3==i%3)   line[6]+=t;
			if(i/3+i%3==2) line[7]+=t;
		}

		char c='d';
		for(int i=0; i<8; i++)
		{
			if(line[i]==+3){c='o'; break;}
			if(line[i]==-3){c='x'; break;}
		}
		cout << c << endl;
	}	
}