//0066

#include<stdio.h>
int main(void)
{
	const int N = 9;
	char str[N+1];
	while(scanf("%s", str) == 1)
	{
		const char ca[] = "ox";
		char findC = 'd';
		for(int i = 0; i <= 1; i++)
		{
			const char c = ca[i];
			if(
				(c == str[0] && c == str[1] && c == str[2]) ||
				(c == str[3] && c == str[4] && c == str[5]) ||
				(c == str[6] && c == str[7] && c == str[8]) ||
				(c == str[0] && c == str[3] && c == str[6]) ||
				(c == str[1] && c == str[4] && c == str[7]) ||
				(c == str[2] && c == str[5] && c == str[8]) ||
				(c == str[0] && c == str[4] && c == str[8]) ||
				(c == str[2] && c == str[4] && c == str[6]) )
			{
				findC = c;
				break;
			}
		}
		putchar(findC);
		putchar('\n');
	}
	return 0;
}