#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#define cinl(str) getline(cin,(str))
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=10000009;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };
int A=0;
void judge(char x,char y,char z){
	if(x=='o'&&y=='o'&&z=='o'){
		cout<<'o'<<endl;
		A++;
	}
	if(x=='x'&&y=='x'&&z=='x'){
		cout<<'x'<<endl;
		A++;
	}
}
int main() {
	string c;
	while(true){
		A=0;
		cin>>c;
		if (cin.eof())break;
		judge(c[0],c[1],c[2]);
		judge(c[0],c[4],c[8]);
		judge(c[0],c[3],c[6]);
		judge(c[1],c[4],c[7]);
		judge(c[2],c[5],c[8]);
		judge(c[2],c[4],c[6]);
		judge(c[3],c[4],c[5]);
		judge(c[6],c[7],c[8]);
		if(A==0){
			cout<<'d'<<endl;
		}
	}
}