function getChangeIndex(input, containText) {
  var index = -1;

  for (var i = input.length - containText.length; i >= 0; i--) {
    if (input[i] !== containText[0] && input[i] !== '?') {
      continue;
    }
    var slicedInput = input.slice(i, i + containText.length);

    var result = true;
    for (var j = 0; j < containText.length; j++) {
      if (slicedInput[j] !== containText[j] && slicedInput[j] !== '?') {
        result = false;
        break;
      }
    }

    if (result) {
      index = i;
      break;
    }
  }
  return index;
}

function solve(inputRaw) {
  var row = inputRaw.trim().split('\n');
  var input = row[0];
  var containText = row[1];

  var index = getChangeIndex(input, containText, 0);

  if (index >= 0) {
    var result = input.substr(0, index) + containText + input.substr(index + containText.length, input.length);
    result = result.split('?').join('a');
    return result;
  }

  return 'UNRESTORABLE';
}

console.log(solve(require('fs').readFileSync('/dev/stdin', 'utf8')));
