void main()
{
    dchar[] s = readln.chomp.to!(dchar[]);
    dchar[] t = readln.chomp.to!(dchar[]);

    long last = t.length - 1;
    bool ok;
    foreach_reverse (i, x; s)
    {
        if (x == t[last] || x == '?')
        {
            bool check = true;
            if (i.to!long - last >= 0)
            {
                foreach (j; 0 .. last)
                {
                    if (s[i-last+j] != t[j] && s[i-last+j] != '?')
                    {
                        check = false;
                        break;
                    }
                }
            }
            else check = false;

            if (check)
            {
                ok = true;
                foreach (j; 0 .. last+1)
                {
                    s[i-last+j] = t[j];
                }
                foreach (j; 0 .. s.length)
                {
                    if (s[j] == '?') s[j] = 'a';
                }
                break;
            }
        }
    }

    if (ok) s.writeln;
    else "UNRESTORABLE".writeln;

}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;