#include <cstdio>

char solve(char mass[])
{
        const int ROW = 8, COL = 3;
        const int bingo[][COL] =
                {{0, 1, 2}, {0, 3, 6}, {0, 4, 8}, {1, 4, 7},
                 {2, 5, 8}, {2, 4, 6}, {3, 4, 5}, {6, 7, 8}};
        int cnt;
        char ans = 'd';

        for (int i = 0; i < ROW; i++) {
                cnt = 0;
                int pos = bingo[i][0];
                if (mass[pos] == 's') {
                        continue;
                }
                for (int j = 1; j < COL; j++) {
                        if (mass[pos] != mass[bingo[i][j]]) {
                                continue;
                        }
                        cnt++;
                        if (cnt == 2) {
                                ans = mass[bingo[i][j]];
                                break;
                        }
                }
        }
        return ans;
}

int main()
{
        char mass[10];

        while (scanf("%9s", mass) != EOF) {
                printf("%c\n", solve(mass));
        }

        return 0;
}