#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <sstream>
#include <vector>
#include <string>
#include <iomanip>
#include <bitset>
using namespace std;
#define INF	100000000
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define lb lower_bound
#define ub upper_bound
#define SS stringstream
#define rep(i,n) for(int i = 0; i < n; i++)
#define sz(x) ((int)(x).size())
#define SORT(x) sort((x).begin(), (x).end())
#define RSORT(x) sort((x).begin(), (x).end(), greater<int>() )
#define clr(a,b) memset((a),(b),sizeof(a))
typedef pair<int, int> P;
typedef long long int ll;
typedef vector<int> Vi;
typedef vector<ll> Vll;
typedef vector<P> Vp;
typedef priority_queue<P, vector<P>, greater<P> > PQ;

string str;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	while(cin >> str){
		char a[3][3];
		bool ok = false;
		rep(u,3) rep(k,3) a[u][k] = str[u*3+k];
		if(a[0][0]==a[1][1]&&a[1][1]==a[2][2]&&a[0][0]!='s'){
			if(a[0][0]=='o') cout << "o" << endl;
			else cout << "x" << endl;
			continue;
		}
		if(a[2][0]==a[1][1]&&a[1][1]==a[0][2]&&a[2][0]!='s'){
			if(a[2][0]=='o') cout << "o" << endl;
			else cout << "x" << endl;
			continue;
		}
		rep(j,3){
			if(a[j][0]==a[j][1]&&a[j][1]==a[j][2]&&a[j][0]!='s'){
				ok = true;
				if(a[j][0] == 'o') cout << "o" << endl;
				else cout << "x" << endl;
				break;
			}
			if(a[0][j]==a[1][j]&&a[1][j]==a[2][j]&&a[0][j]!='s'){
				ok = true;
				if(a[0][j] == 'o') cout << "o" << endl;
				else cout << "x" << endl;
				break;
			}
		}
		if(!ok) cout << "d" << endl;
	}
}