##Hint for matching: We get the one that has the most match

#For each space in the interval: Match each blank and count it (The T is given to have at most n-1 matches where n is the length of T)

#For absolute match: it has n-1 matches
#For local match: it has the maximum matches

#For no match: The T belongs to the last

#The code is unrestorable if:
    #1) T > S
    #2) code doesn't fit anywhere(?)

S = input()
T = input()
code = S
match = 0
maxmatch = 0
maxmatchloc = -1
hasmatch = False
##if (len(T) == 1):
##    for x in range(len(S)-1,0,-1):
##        if (S[x] == '?'):
##            S = S[:x] + T + S[x+1:]
##            break
##    code = S
##    for x in range(len(S)):
##        if (S[x] == '?'):
##            code = code[:x] + 'a' + code[x+1:]
##    print(code)
##Missing function: When none of the letters of T match the one in a, thenit finds the farthest point to land on
elif '?' in S:
    if (len(T) <= len(S)):
            for x in range(len(S)-(len(T)-1)):
                match = 0
                for i in range(len(T)):                
                    if (S[x+i] == T[i]):##when i add (or S[x+i] == '?') it solves 8 it makes an error on the others
                        if (maxmatch == -1):
                            maxmatch = 0
                        match += 1
                    elif (S[x+i] != T[i] and S[x+i] != '?'):
                        maxmatch = -1
                        break
                    elif (S[x+i] != T[i] and S[i] == '?'):
                        match += 1
                        
                if (maxmatch == -1 and hasmatch == False):
                    continue
                #if match
                if (match >= maxmatch and maxmatch != -1 and match < len(T)):
                    hasmatch = True 
                    maxmatch = match
                    maxmatchloc = x
            #Building the code#
            for x in range(len(S)):
                if (S[x] == '?'):
                    code = code[:x] + 'a' + code[x+1:] 
            if (maxmatch == 0):
                code = code[:len(S)-len(T)] + T
                print(code)
            elif(maxmatchloc >= 0):
                code = code[:maxmatchloc] + T + code[maxmatchloc + len(T):]
                print(code)
            elif(maxmatchloc == -1):
                print('UNRESTORABLE')
            else:
                print('UNRESTORABLE')
    else:
        print('UNRESTORABLE')
else:
    print(S)
    

    


### FIXED CODE ###

def search(S,T):
    match = 0
    maxmatch = 0
    maxmatchloc = -1
    for x in range(len(S)-(len(T)-1)):
        match = 0
        if (S[x] == T[0] or S[x] == '?'):
            for i in range(0,len(T)):
                ##print(S[x+i] + '-' + T[i])
                if (S[x+i] == T[i] or S[x+i] == "?"):
                    match += 1
                else:
                    ##print("Entered!")
                    match = 0
                    break
            if (match >= maxmatch and match != 0):
                ##print("ENTERED")
                maxmatchloc = x
                maxmatch = match
        ##print('At x = ' + str(x) + ': maxmatchlocation is ' + str(maxmatchloc) + ' match is ' + str(match) + ' maxmatch is' + str(maxmatch))
    return maxmatchloc

S = input()
T = input()
code = S
if '?' in S:
    if (len(T) <= len(S)):
        startpoint = search(S,T)
        for x in range(len(S)):
            if (S[x] == '?'):
                code = code[:x] + 'a' + code[x+1:] 
        if(startpoint >= 0):
            code = code[:startpoint] + T + code[startpoint + len(T):]
            print(code)
        else:
            print('UNRESTORABLE')
    else:
        print('UNRESTORABLE')
else:
    print(S)