#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        string s;
        if(!(cin >> s))
            return 0;

        char c = 'd';
        for(int i=0; i<3; ++i){
            if(s[i*3] != 's' && s[i*3] == s[i*3+1] && s[i*3] == s[i*3+2])
                c = s[i*3];
            if(s[i] != 's' && s[i] == s[3+i] && s[i] == s[6+i])
                c = s[i];
        }
        if(s[0] != 's' && s[0] == s[4] && s[0] == s[8])
            c = s[0];
        if(s[2] != 's' && s[2] == s[4] && s[2] == s[6])
            c = s[2];
        cout << c << endl;
    }
}