#include <iostream>
#include <string>

int main(){
	using namespace std;
	string str;
	bool judge = false;
	int x = 0;
	while(cin >> str){
		for(;;x++){
			if(x == 4){
				for(int i=1;i<=4;i++){
					if(str[(x + i)] == str[x] && str[(x - i)] == str[x] && str[x] != 's'){
						cout << str[x] << endl;
						judge = true;
						break;
					}
				}
				if(judge==true) break;
			}
			else if(x == 1 || x == 7){
				if(str[x] == str[x-1] && str[x] == str[x+1]&& str[x] != 's'){
					cout << str[x] << endl;
					break;
				}
			}
			else if(x == 3 || x == 5){
				if(str[x] == str[x+3] && str[x] == str[x-3]&& str[x] != 's'){
					cout << str[x] << endl;
					break;
				}
			}
			else if(x == 8){
				cout << 'd' << endl;
				break;
			}
		}
		judge = false;
		x = 0;
	}
	return 0;
}