#include <iostream>
#include <string>
using namespace std;

int main() {
  string s;
  while(cin >> s) {
    int win=-1;
    if((s[0]=='o' && s[1]=='o' && s[2]=='o') || (s[3]=='o' && s[4]=='o' && s[5]=='o') || (s[6]=='o' && s[7]=='o' && s[8]=='o') || (s[0]=='o' && s[3]=='o' && s[6]=='o') || (s[1]=='o' && s[4]=='o' && s[7]=='o') || (s[2]=='o' && s[5]=='o' && s[8]=='o') ||  (s[0]=='o' && s[4]=='o' && s[8]=='o') || (s[2]=='o' && s[4]=='o' && s[6]=='o')) win=1;
if((s[0]=='x' && s[1]=='x' && s[2]=='x') || (s[3]=='x' && s[4]=='x' && s[5]=='x') || (s[6]=='x' && s[7]=='x' && s[8]=='x') || (s[0]=='x' && s[3]=='x' && s[6]=='x') || (s[1]=='x' && s[4]=='x' && s[7]=='x') || (s[2]=='x' && s[5]=='x' && s[8]=='x') ||  (s[0]=='x' && s[4]=='x' && s[8]=='x') || (s[2]=='x' && s[4]=='x' && s[6]=='x')) win=2;
 if(win==-1) cout << "d" << endl;
 else if(win==1) cout << "o" << endl;
 else cout << "x" << endl;
  }
  return 0;
}
