#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <utility>
#include <numeric>

using namespace std;

using ll = long long;
using ull = unsigned long long;

const ll inf = (ll)1e9;
const ll mod = (ll)1e9 + 7;

int main()
{
	string s;
	while (cin >> s)
	{
		string ans = "";
		for (int i = 0; i < s.length(); i++)
		{
			if (s.at(i) == 'o' || s.at(i) == 'x')
			{
				switch (i)
				{
					case 0:
						if ((s.at(0) == s.at(1) && s.at(0) == s.at(2))
							|| (s.at(0) == s.at(3) && s.at(0) == s.at(6))
							|| (s.at(0) == s.at(4) && s.at(0) == s.at(8)))
						{
							ans = s.substr(0, 1);
						}
						break;
					case 1:
						if ((s.at(1) == s.at(4) && s.at(1) == s.at(7)))
						{
							ans = s.substr(1, 1);
						}
						break;
					case 2:
						if ((s.at(2) == s.at(5) && s.at(2) == s.at(8))
							|| (s.at(2) == s.at(4) && s.at(2) == s.at(6)))
						{
							ans = s.substr(2, 1);
						}
						break;
					case 3:
						if ((s.at(3) == s.at(4) && s.at(3) == s.at(5)))
						{
							ans = s.substr(3, 1);
						}
						break;
					case 6:
						if ((s.at(6) == s.at(7) && s.at(6) == s.at(8)))
						{
							ans = s.substr(6, 1);
						}
					break;
				}
			}

			if (ans != "")
			{
				cout << ans << endl;
				break;
			}
		}

		if (ans == "")
		{
			cout << "d" << endl;
		}
	}
}
