#include <bits/stdc++.h>

using namespace std;

void solve(string s) {
    for (int i = 0; i < 3; i++) {
        int ni = 3 * i;
        if ((s[ni] != 's') && (s[ni] == s[ni + 1] && s[ni] == s[ni + 2])) {
            cout << s[ni] << endl;
            return;
        } else if ((s[i] != 's') && (s[i] == s[i + 3] && s[i] == s[i + 6])) {
            cout << s[i] << endl;
            return;
        }
    }

    if ((s[4] != 's') && ((s[4] == s[0] && s[4] == s[8]) || (s[4] == s[2] && s[4] == s[6]))) {
        cout << s[4] << endl;
        return;
    }

    cout << "d" << endl;
}

int main()  {
    string s;
    while (cin >> s)
        solve(s);

    return 0;
}
