#include <bits/stdc++.h>
using namespace std;
  
// #define int long long
#define pb push_back
#define print(Target) cout << Target << '\n'

#define REP(i, n) for (int i = 0; i < (n); i++)
#define REPS(i, a, n) for (int i = (a); i < (n); i++)

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef pair<int, int> pii;

bool is_uruu(int y) {return (y % 4 == 0 && (y % 100 != 0 || y % 400 == 0));}
const string c = "ox";

signed main()
{
  ios::sync_with_stdio(false);
  string s;

  for (;cin >> s;){
    string res = "d";
    REP(i, 2){
      for (int j = 0; j < 9; j += 3){
        if (c[i] == s[j] && c[i] == s[j + 1] && c[i] == s[j + 2]){
          res = c[i];
          break;
        }
      }
      for (int j = 0; j < 3; j++){
        if (c[i] == s[j] && c[i] == s[j + 3] && c[i] == s[j + 6]){
          res = c[i];
          break;
        }
      }
      if (c[i] == s[0] && c[i] == s[4] && c[i] == s[8]){
        res = c[i];
      }
      if (c[i] == s[2] && c[i] == s[4] && c[i] == s[6]){
        res = c[i];
      }
    }
    print(res);
  }

  return (0);
}