#include<iostream>
#include<string>
using namespace std;

string s;

int di[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dj[] = {1, -1, 1, 0, -1, 1, 0, -1};

char check(int i, int j, int di, int dj) {
    char last = '?';
    for (int t = 0; t < 3; ++t) {
        if (i < 0 || i >= 3 || j < 0 || j >= 3) {
            return 'd';
        }
        if (last != '?' && last != s[i * 3 + j]) {
            return 'd';
        }
        last = s[i * 3 + j];
        i += di;
        j += dj;
    }
    if (last == 'o' || last == 'x') return last;
    return 'd';
}

int main() {
    while(cin >> s) {
        // cout << s<< endl;
        char ans = 'd';
        for (int i = 0; i < 3; ++i) {
            for (int j = 0; j < 3; ++j) {
                for (int k = 0; k < 8; ++k) {
                    char tmp = check(i, j, di[k], dj[k]);
                    // cout <<  i << " " << j << " " << tmp << endl;
                    if (tmp != 'd') {
                        ans = tmp;
                        break;
                    }
                }
                if (ans != 'd') break;
            }
            if (ans != 'd') break;
        }
        cout << ans << endl;
    }
    return 0;
}
