#include <cstdio>
int main(){
	char x[9];
	while(scanf("%s",&x)!=EOF){
		if(x[0]==x[1] && x[1]==x[2] & x[0]=='o'){
			printf("o\n");
			continue;
		}
		if(x[3]==x[4] && x[4]==x[5] & x[3]=='o'){
			printf("o\n");
			continue;
		}		
		if(x[6]==x[7] && x[7]==x[8] & x[7]=='o'){
			printf("o\n");
			continue;
		}
		if(x[0]==x[3] && x[3]==x[6] & x[0]=='o'){
			printf("o\n");
			continue;
		}
		if(x[1]==x[4] && x[4]==x[7] & x[1]=='o'){
			printf("o\n");
			continue;
		}
		if(x[2]==x[5] && x[5]==x[8] & x[2]=='o'){
			printf("o\n");
			continue;
		}
		if(x[0]==x[4] && x[4]==x[8] & x[0]=='o'){
			printf("o\n");
			continue;
		}
		if(x[2]==x[4] && x[4]==x[6] & x[2]=='o'){
			printf("o\n");
			continue;
		}
		if(x[0]==x[1] && x[1]==x[2] & x[0]=='x'){
			printf("x\n");
			continue;
		}
		if(x[3]==x[4] && x[4]==x[5] & x[3]=='x'){
			printf("x\n");
			continue;
		}		
		if(x[6]==x[7] && x[7]==x[8] & x[7]=='x'){
			printf("x\n");
			continue;
		}
		if(x[0]==x[3] && x[3]==x[6] & x[0]=='x'){
			printf("x\n");
			continue;
		}
		if(x[1]==x[4] && x[4]==x[7] & x[1]=='x'){
			printf("x\n");
			continue;
		}
		if(x[2]==x[5] && x[5]==x[8] & x[2]=='x'){
			printf("x\n");
			continue;
		}
		if(x[0]==x[4] && x[4]==x[8] & x[0]=='x'){
			printf("x\n");
			continue;
		}
		if(x[2]==x[4] && x[4]==x[6] & x[2]=='x'){
			printf("x\n");
			continue;
		}
		printf("d\n");
	}
	return 0;
}