#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;

int check(string s, char c)
{
    bool ans = 0;
    rep(i, 3)
    {
        if (s[i] == c && s[i + 3] == c && s[i + 6] == c)
            ans = 1;
    }
    for (int i = 0; i < 9; i += 3)
    {
        if (s[i] == c && s[i + 1] == c && s[i + 2] == c)
            ans = 1;
    }
    if (s[0] == c && s[4] == c && s[8] == c || s[2] == c && s[4] == c && s[6] == c)
        ans = 1;

    return ans;
}

int main()
{

    string s;
    while (cin >> s)
    {
        if (check(s, 'o'))
            OP('o');
        else if (check(s, 'x'))
            OP('x');
        else
            OP('d');
    }
    return 0;
}
