#include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <string>
#include <sstream>
#include <stack>
#include <iomanip>
#include <numeric>
#include <queue>
#include <climits>
#include <set>
#include <complex>
#include <cmath>
#include <cstring>
#include <map>
using namespace std;
using ll = long long;
#define MOD 1000000007
#define INF 1LL << 59
int main()
{
    //std::ios::sync_with_stdio(false);
    //std::cin.tie(0);
    //cout << fixed << setprecision(7);
    string s;
    while (cin >> s)
    {
        char c = 'd';
        if (s[0] == 'o' && s[1] == 'o' && s[2] == 'o')
            c = 'o';
        if (s[3] == 'o' && s[4] == 'o' && s[5] == 'o')
            c = 'o';
        if (s[6] == 'o' && s[7] == 'o' && s[8] == 'o')
            c = 'o';
        if (s[0] == 'o' && s[3] == 'o' && s[6] == 'o')
            c = 'o';
        if (s[1] == 'o' && s[4] == 'o' && s[7] == 'o')
            c = 'o';
        if (s[2] == 'o' && s[5] == 'o' && s[8] == 'o')
            c = 'o';
        if (s[0] == 'o' && s[4] == 'o' && s[8] == 'o')
            c = 'o';
        if (s[2] == 'o' && s[4] == 'o' && s[6] == 'o')
            c = 'o';

        if (s[0] == 'x' && s[1] == 'x' && s[2] == 'x')
            c = 'x';
        if (s[3] == 'x' && s[4] == 'x' && s[5] == 'x')
            c = 'x';
        if (s[6] == 'x' && s[7] == 'x' && s[8] == 'x')
            c = 'x';
        if (s[0] == 'x' && s[3] == 'x' && s[6] == 'x')
            c = 'x';
        if (s[1] == 'x' && s[4] == 'x' && s[7] == 'x')
            c = 'x';
        if (s[2] == 'x' && s[5] == 'x' && s[8] == 'x')
            c = 'x';
        if (s[0] == 'x' && s[4] == 'x' && s[8] == 'x')
            c = 'x';
        if (s[2] == 'x' && s[4] == 'x' && s[6] == 'x')
            c = 'x';

        cout << c << endl;
    }
    return 0;
}
