#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

string str;	
bool lose(int a,int b,int c){
	return str[a]=='x'&&str[b]=='x'&&str[c]=='x';
}
bool win(int a,int b,int c){
	return str[a]=='o'&&str[b]=='o'&&str[c]=='o';
}

int main() {
	while(cin>>str){
		if(win(0,1,2)||win(3,4,5)||win(6,7,8)||win(0,3,6)||win(1,4,7)||win(2,5,8)||win(0,4,8)||win(2,4,6)){
			puts("o");
		}else if(lose(0,1,2)||lose(3,4,5)||lose(6,7,8)||lose(0,3,6)||lose(1,4,7)||lose(2,5,8)||lose(0,4,8)||lose(2,4,6)){
			puts("x");
		}else puts("d");
		
	}
	return 0;
}