text: #include <bits/stdc++.h>
  
  using namespace std;
  
  // Complete the palindromeIndex function below.
  int palindromeIndex(string s) {
  
  
  }
  
  int main()
  {
      ofstream fout(getenv("OUTPUT_PATH"));
  
      int q;
      cin >> q;
      cin.ignore(numeric_limits<streamsize>::max(), '\n');
  
      for (int q_itr = 0; q_itr < q; q_itr++) {
          string s;
          getline(cin, s);
  
          int result = palindromeIndex(s);
  
          fout << result << "\n";
      }
  
      fout.close();
  
      return 0;
  }
  