#include<stdio.h>
int main(void){
   int str2[100], i = 0, 
   char str[100];
   scanf("%s", str);
   while (str[i] != \0) {
   if ( str[i] == 'o') str2[i] = 1;
   else if ( str[i] == 'x') str2[i] = 2;
   else if ( str[i] == 's') str2[i] = 0;
   i++
   }
   if ( str2[1] + str[2] + str[3] == 3 ) printf("o");
   else if ( str2[1] + str[2] + str[3] == 6 ) printf("x\n");
   else if ( str2[4] + str[5] + str[6] == 3 ) printf("o\n");
   else if ( str2[4] + str[5] + str[6] == 6 ) printf("x\n");
   else if ( str2[7] + str[8] + str[9] == 3 ) printf("o\n");
   else if ( str2[7] + str[8] + str[9] == 6 ) printf("x\n");
   else if ( str2[1] + str[4] + str[7] == 3 ) printf("o\n");
   else if ( str2[1] + str[4] + str[7] == 6 ) printf("x\n");
   else if ( str2[2] + str[5] + str[8] == 3 ) printf("o\n");
   else if ( str2[2] + str[5] + str[8] == 6 ) printf("x\n");
   else if ( str2[3] + str[6] + str[9] == 3 ) printf("o\n");
   else if ( str2[3] + str[6] + str[9] == 6 ) printf("x\n");
   else if ( str2[1] + str[5] + str[9] == 3 ) printf("o\n");
   else if ( str2[1] + str[5] + str[9] == 6 ) printf("x\n");
   else if ( str2[3] + str[5] + str[7] == 3 ) printf("o\n");
   else if ( str2[3] + str[5] + str[7] == 6 ) printf("x\n");
   else printf("d\n");