Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
 
int main(){
  int t;
  cin >> t;
 
  for(int i=0;i<t;i++){
    string x;
    cin >> x;
    set<string> s;
    for( int i = 1, length = x.length() ; i < length ; ++i ){
      string left, right;
      
?????????left = x.substr(0,i);
right = x.substr(i, length-i);
      s.insert(left+right);
      s.insert(right+left);

reverse(right.begin(), right.end());
      s.insert(left+right);
      s.insert(right+left);

reverse(left.begin(), left.end());
      s.insert(left+right);
      s.insert(right+left);
     
reverse(right.begin(), right.end());
      s.insert(left+right);
      s.insert(right+left);
    }
    cout << s.size() << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:1: error: expected primary-expression before '?' token
   18 | ?????????left = x.substr(0,i);
      | ^
a.cc:18:2: error: expected primary-expression before '?' token
   18 | ?????????left = x.substr(0,i);
      |  ^
a.cc:18:3: error: expected primary-expression before '?' token
   18 | ?????????left = x.substr(0,i);
      |   ^
a.cc:18:4: error: expected primary-expression before '?' token
   18 | ?????????left = x.substr(0,i);
      |    ^
a.cc:18:5: error: expected primary-expression before '?' token
   18 | ?????????left = x.substr(0,i);
      |     ^
a.cc:18:6: error: expected primary-expression before '?' token
   18 | ?????????left = x.substr(0,i);
      |      ^
a.cc:18:7: error: expected primary-expression before '?' token
   18 | ?????????left = x.substr(0,i);
      |       ^
a.cc:18:8: error: expected primary-expression before '?' token
   18 | ?????????left = x.substr(0,i);
      |        ^
a.cc:18:9: error: expected primary-expression before '?' token
   18 | ?????????left = x.substr(0,i);
      |         ^
a.cc:18:30: error: expected ':' before ';' token
   18 | ?????????left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:18:30: error: expected primary-expression before ';' token
a.cc:18:30: error: expected ':' before ';' token
   18 | ?????????left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:18:30: error: expected primary-expression before ';' token
a.cc:18:30: error: expected ':' before ';' token
   18 | ?????????left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:18:30: error: expected primary-expression before ';' token
a.cc:18:30: error: expected ':' before ';' token
   18 | ?????????left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:18:30: error: expected primary-expression before ';' token
a.cc:18:30: error: expected ':' before ';' token
   18 | ?????????left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:18:30: error: expected primary-expression before ';' token
a.cc:18:30: error: expected ':' before ';' token
   18 | ?????????left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:18:30: error: expected primary-expression before ';' token
a.cc:18:30: error: expected ':' before ';' token
   18 | ?????????left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:18:30: error: expected primary-expression before ';' token
a.cc:18:30: error: expected ':' before ';' token
   18 | ?????????left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:18:30: error: expected primary-expression before ';' token
a.cc:18:30: error: expected ':' before ';' token
   18 | ?????????left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:18:30: error: expected primary-expression before ';' token