output_description: Print the string S.  
  If such a string does not exist, print `UNRESTORABLE` instead.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
      T'
attempt: from string import ascii_lowercase
  
  code = input()
  hint = input()
  
  
  def is_match(code, s):
      """
      >>> is_match('abc', 'abc')
      True
      >>> is_match('a?c', 'axc')
      True
      >>> is_match('???', 'xyz')
      True
      >>> is_match('abc', 'abd')
      False
      >>> is_match('abc', 'abcd')
      False
      >>> is_match('?p?', 'abc')
      False
      """
      if len(code) != len(s):
          return False
      for a, b in zip(code, s):
          if not (a == b or a == "?"):
              return False
      return True
  
  
  def guess(code, hint):
      """
      >>> guess('?tc????', 'coder')
      'atcoder'
      >>> guess('?p??d??', 'abc')
      'UNRESTORABLE'
      >>> guess('?????er', 'coder')
      'aacoder'
      """
      reversed_code = code[::-1]
      reversed_hint = hint[::-1]
  
      for i in range(len(code)):
          if is_match(reversed_code[i : len(hint)], reversed_hint):
              merged = reversed_code[:i] + reversed_hint + reversed_code[i + len(hint) :]
              return merged[::-1].replace("?", "a")
  
      return "UNRESTORABLE"
  
  
  print(guess(code, hint))
  
problem_description: Statement
  
  E869120 found a chest which is likely to contain treasure.  
  However, the chest is locked. In order to open it, he needs to enter a string
  S consisting of lowercase English letters.  
  He also found a string S', which turns out to be the string S with some of its
  letters (possibly all or none) replaced with `?`.
  
  One more thing he found is a sheet of paper with the following facts written
  on it:
  
    * Condition 1: The string S contains a string T as a contiguous substring.
    * Condition 2: S is the lexicographically smallest string among the ones that satisfy Condition 1.
  
  Print the string S.  
  If such a string does not exist, print `UNRESTORABLE`.
samples: [{"input": "?tc????\n    coder", "output": "atcoder\n    \n\nThere are 26 strings that satisfy Condition 1: `atcoder`, `btcoder`,\n`ctcoder`,..., `ztcoder`. Among them, the lexicographically smallest is\n`atcoder`, so we can say S = `atcoder`.\n\n* * *"}, {"input": "??p??d??\n    abc", "output": "UNRESTORABLE\n    \n\nThere is no string that satisfies Condition 1, so the string S does not exist."}]