#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) {
    for (int k = 0; k < 9; ++k) {
        char last = '?';
        for (int t = 0; t < 3; ++t) {
            if (i < 0 || i >= 3 || j < 0 || j >= 3) {
                last = 'd';
                break;
            }
            if (last != '?' && last != s[i * 3 + j]) {
                last = 'd';
                break;
            }
            // cout << s[i * 3 + j];
            last = s[i * 3 + j];
            i += di[k];
            j += dj[k];
        }
        if (last == 'o' || last == 'x') return last;
    }
    return 'd';
}

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