Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define INF 1<<30
#define LINF 1LL<<60

/*
<url:>
問題文============================================================

=================================================================

解説=============================================================

================================================================
*/
int main(void) {
	cin.tie(0); ios::sync_with_stdio(false);
    string S,T; cin >> S >> T;
    string ans(S.length(),'z');
    bool f = false;
    for(int i = 0; i < S.length();i++){
        if(i + T.length() > ??p??d??
           abcS.length())break;
        string tmp = "";
        for(int j = 0; j < i;j++){
            if(S[j] == '?') tmp+="a";
            else tmp += S[j];
        }
        bool dame = false;
        for(int j = i; j < i + T.length();j++){
            if(S[j] == '?') tmp += T[j-i];
            else{
                if(S[j] == T[j-i]){
                    tmp += T[j-i];
                }else{
                    dame = true;
                    break;
                }
            }
        }
        if(dame)continue;
        for(int j = i + T.length(); j < S.length();j++){
            if(S[j] == '?') tmp += "a";
            else tmp += S[j];
        }
        
        f = true;
        ans = min(ans,tmp);
    }
    
    if(f){
        cout << ans << endl;
    }else{
        cout << "UNRESTORABLE" << endl;
    }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:29: error: expected primary-expression before '?' token
   25 |         if(i + T.length() > ??p??d??
      |                             ^
a.cc:25:30: error: expected primary-expression before '?' token
   25 |         if(i + T.length() > ??p??d??
      |                              ^
a.cc:25:31: error: 'p' was not declared in this scope
   25 |         if(i + T.length() > ??p??d??
      |                               ^
a.cc:25:33: error: expected primary-expression before '?' token
   25 |         if(i + T.length() > ??p??d??
      |                                 ^
a.cc:25:34: error: 'd' was not declared in this scope
   25 |         if(i + T.length() > ??p??d??
      |                                  ^
a.cc:25:36: error: expected primary-expression before '?' token
   25 |         if(i + T.length() > ??p??d??
      |                                    ^
a.cc:26:12: error: 'abcS' was not declared in this scope
   26 |            abcS.length())break;
      |            ^~~~
a.cc:26:25: error: expected ':' before ')' token
   26 |            abcS.length())break;
      |                         ^
      |                         :
a.cc:26:25: error: expected primary-expression before ')' token
a.cc:26:25: error: expected ':' before ')' token
   26 |            abcS.length())break;
      |                         ^
      |                         :
a.cc:26:25: error: expected primary-expression before ')' token
a.cc:26:25: error: expected ':' before ')' token
   26 |            abcS.length())break;
      |                         ^
      |                         :
a.cc:26:25: error: expected primary-expression before ')' token
a.cc:26:25: error: expected ':' before ')' token
   26 |            abcS.length())break;
      |                         ^
      |                         :
a.cc:26:25: error: expected primary-expression before ')' token
a.cc:26:25: error: expected ':' before ')' token
   26 |            abcS.length())break;
      |                         ^
      |                         :
a.cc:26:25: error: expected primary-expression before ')' token
a.cc:26:25: error: expected ':' before ')' token
   26 |            abcS.length())break;
      |                         ^
      |                         :
a.cc:26:25: error: expected primary-expression before ')' token