#include<iostream>
#include<string>
#include<vector>
using namespace std;



int main() {
	//??£?¨?
	string point_pieces;
	int pieces[9];
	int check;
	vector<char> anss;
	while (cin >> point_pieces) {
		//point_pieces?????????????????????
		for (int i = 0; i < 9; i++) {
			if (point_pieces[i] == 'o')pieces[i] = 1;
			else if (point_pieces[i] == 'x')pieces[i] = 0;
			else if (point_pieces[i] == 's')pieces[i] = -100;
		}
		//?????¢????¢?????????? o???????????£????????????check????????????s???????????£????????????check????????????????????£??????????????£??????-????????????
		check = -1;
		for (int i = 0; i < 3; i++) {
			if (pieces[i * 3] + pieces[i * 3 + 1] + pieces[i * 3 + 2] == 3)check = 0;
			else  if (pieces[i * 3] + pieces[i * 3 + 1] + pieces[i * 3 + 2] == 0)check = 1;
		}
		for (int i = 0; i < 3; i++) {
			if (pieces[i] + pieces[i + 3] + pieces[i + 6] == 3)check = 0;
			else if (pieces[i] + pieces[i + 3] + pieces[i + 6] == 0)check = 1;
		}
		if (pieces[0] + pieces[4] + pieces[8] == 3)check = 0;
		else if (pieces[0] + pieces[4] + pieces[8] == 0)check = 1;
		if (pieces[2] + pieces[4] + pieces[6] == 3)check = 0;
		else if (pieces[2] + pieces[4] + pieces[6] == 0)check = 1;
		//check?????????
		if (check == 0)cout << 'o' << endl;
		else if (check == 1)cout << 'x' << endl;
		else cout << 'd' << endl;
	}
	
}