#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

void solve(string s){
    vector<int> a(8);
    for (int i = 0; i < 9; ++i) {
        int y = i/3, x = i%3;
        int val = (s[i] == 'o' ? 0 : (s[i] == 'x' ? 1 : -100));
        a[y] += val; a[x+3] += val;
        if(y == x) a[6] += val;
        else if(y == 2-x) a[7] += val;
    }
    for (int i = 0; i < 8; ++i) {
        if(a[i] == 0) {
            puts("o");
            return;
        }else if(a[i] == 3){
            puts("x");
            return;
        }
    }
    puts("d");
}

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