#include<iostream>
#include<string>
int main()
{
	for (std::string str; std::cin >> str;)
	{
		auto check = [&str](char c)
		{
			return
				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] == c;
		};
		std::cout << (check('o') ? 'o' : check('x') ? 'x' : 'd') << std::endl;
	}
}
