func_code_string: #include <bits/stdc++.h>   using namespace std;   int q;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     cin >> q;     while (q--) {       bool ch = false;       string s;       cin >> s;       if (s.size() == 1) {         if (s[0] ==  ? )           cout <<  a ;         else           cout << s;       } else {         if (s[0] ==  ? ) {           if (s[1] ==  a  || s[1] ==  b )             s[0] =  c ;           else             s[0] =  a ;         }         for (int i = 1; i < s.size(); i++) {           if (s[i] ==  ? ) {             bool a = 0, b = 0, c = 0;             if (s[i - 1] ==  a  || s[i + 1] ==  a ) a = 1;             if (s[i - 1] ==  b  || s[i + 1] ==  b ) b = 1;             if (s[i - 1] ==  c  || s[i + 1] ==  c ) c = 1;             if (!a) s[i] =  a ;             if (!b) s[i] =  b ;             if (!c) s[i] =  c ;           }         }         if (s[s.size() - 1] ==  ? ) {           if (s[s.size() - 2] ==  a  || s[s.size() - 2] ==  b )             s[s.size() - 1] =  c ;           else             s[s.size() - 1] =  a ;         }         for (int i = 0; i < s.size() - 1; i++)           if (s[i] == s[i + 1]) ch = 1;         if (!ch)           cout << s;         else           cout << -1;       }       cout <<   n ;     }   }   