#include <iostream>
#include <string>

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