Language: C++

#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cmath>
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>

using namespace std;

#define endl '\n'

typedef long long ll;
typedef long double lb;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef pair<int, int> pii;
typedef pair<int, string> pis;
typedef pair<string, int> psi;

inline bool inside(int y, int x, int H, int W)
{ 
  return (y >= 0 && x >= 0 && y < H && x < W);
}

inline int in() {int x; std::cin >> x; return x;}

const ll MOD = 1e9 + 7;
const ll INF = 1e9 + 9;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  string s;

  while (cin >> s){
         if (s[0] == s[1] && s[1] == s[2] && s[0] != 's') cout << s[0] << endl;
    else if (s[3] == s[4] && s[4] == s[5] && s[3] != ’s') cout << s[3] << endl;
    else if (s[6] == s[7] && s[7] == s[8] && s[6] != ’s') cout << s[6] << endl;

    else if (s[0] == s[3] && s[3] == s[6] && s[0] != ’s') cout << s[0] << endl;
    else if (s[1] == s[4] && s[4] == s[7] && s[1] != ’s') cout << s[1] << endl;
    else if (s[2] == s[5] && s[5] == s[8] && s[2] != ’s') cout << s[2] << endl;

    else if (s[0] == s[4] && s[4] == s[8] && s[4] != ’s') cout << s[4] << endl;
    else if (s[2] == s[4] && s[4] == s[6] && s[4] != ’s') cout << s[4] << endl;

    else cout << 'd' << endl;
  }
      

  return (0);
}

Compiler output:
a.cc:44:54: error: extended character ’ is not valid in an identifier
   44 |     else if (s[3] == s[4] && s[4] == s[5] && s[3] != ’s') cout << s[3] << endl;
      |                                                      ^
a.cc:44:56: warning: missing terminating ' character
   44 |     else if (s[3] == s[4] && s[4] == s[5] && s[3] != ’s') cout << s[3] << endl;
      |                                                        ^
a.cc:44:56: error: missing terminating ' character
   44 |     else if (s[3] == s[4] && s[4] == s[5] && s[3] != ’s') cout << s[3] << endl;
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc:45:54: error: extended character ’ is not valid in an identifier
   45 |     else if (s[6] == s[7] && s[7] == s[8] && s[6] != ’s') cout << s[6] << endl;
      |                                                      ^
a.cc:45:56: warning: missing terminating ' character
   45 |     else if (s[6] == s[7] && s[7] == s[8] && s[6] != ’s') cout << s[6] << endl;
      |                                                        ^
a.cc:45:56: error: missing terminating ' character
   45 |     else if (s[6] == s[7] && s[7] == s[8] && s[6] != ’s') cout << s[6] << endl;
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc:47:54: error: extended character ’ is not valid in an identifier
   47 |     else if (s[0] == s[3] && s[3] == s[6] && s[0] != ’s') cout << s[0] << endl;
      |                                                      ^
a.cc:47:56: warning: missing terminating ' character
   47 |     else if (s[0] == s[3] && s[3] == s[6] && s[0] != ’s') cout << s[0] << endl;
      |                                                        ^
a.cc:47:56: error: missing terminating ' character
   47 |     else if (s[0] == s[3] && s[3] == s[6] && s[0] != ’s') cout << s[0] << endl;
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc:48:54: error: extended character ’ is not valid in an identifier
   48 |     else if (s[1] == s[4] && s[4] == s[7] && s[1] != ’s') cout << s[1] << endl;
      |                                                      ^
a.cc:48:56: warning: missing terminating ' character
   48 |     else if (s[1] == s[4] && s[4] == s[7] && s[1] != ’s') cout << s[1] << endl;
      |                                                        ^
a.cc:48:56: error: missing terminating ' character
   48 |     else if (s[1] == s[4] && s[4] == s[7] && s[1] != ’s') cout << s[1] << endl;
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc:49:54: error: extended character ’ is not valid in an identifier
   49 |     else if (s[2] == s[5] && s[5] == s[8] && s[2] != ’s') cout << s[2] << endl;
      |                                                      ^
a.cc:49:56: warning: missing terminating ' character
   49 |     else if (s[2] == s[5] && s[5] == s[8] && s[2] != ’s') cout << s[2] << endl;
      |                                                        ^
a.cc:49:56: error: missing terminating ' character
   49 |     else if (s[2] == s[5] && s[5] == s[8] && s[2] != ’s') cout << s[2] << endl;
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc:51:54: error: extended character ’ is not valid in an identifier
   51 |     else if (s[0] == s[4] && s[4] == s[8] && s[4] != ’s') cout << s[4] << endl;
      |                                                      ^
a.cc:51:56: warning: missing terminating ' character
   51 |     else if (s[0] == s[4] && s[4] == s[8] && s[4] != ’s') cout << s[4] << endl;
      |                                                        ^
a.cc:51:56: error: missing terminating ' character
   51 |     else if (s[0] == s[4] && s[4] == s[8] && s[4] != ’s') cout << s[4] << endl;
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc:52:54: error: extended character ’ is not valid in an identifier
   52 |     else if (s[2] == s[4] && s[4] == s[6] && s[4] != ’s') cout << s[4] << endl;
      |                                                      ^
a.cc:52:56: warning: missing terminating ' character
   52 |     else if (s[2] == s[4] && s[4] == s[6] && s[4] != ’s') cout << s[4] << endl;
      |                                                        ^
a.cc:52:56: error: missing terminating ' character
   52 |     else if (s[2] == s[4] && s[4] == s[6] && s[4] != ’s') cout << s[4] << endl;
      |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:44:54: error: '\U00002019s' was not declared in this scope
   44 |     else if (s[3] == s[4] && s[4] == s[5] && s[3] != ’s') cout << s[3] << endl;
      |                                                      ^~
a.cc:44:56: error: expected ')' before 'else'
   44 |     else if (s[3] == s[4] && s[4] == s[5] && s[3] != ’s') cout << s[3] << endl;
      |             ~                                          ^
      |                                                        )
   45 |     else if (s[6] == s[7] && s[7] == s[8] && s[6] != ’s') cout << s[6] << endl;
      |     ~~~~