void main()
{
    dchar[] s = rdDchar;
    dchar[] t = rdDchar;

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

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

    writeln(ok ? s.to!string : "UNRESTORABLE");
}

/*
void main()
{
    dchar[] s = rdDchar;
    dchar[] t = rdDchar;

    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;
}
*/

enum long mod = 10^^9 + 7;
enum long inf = 1L << 60;

T rdElem(T = long)()
if (!is(T == struct))
{
    return readln.chomp.to!T;
}

alias rdStr = rdElem!string;
alias rdDchar = rdElem!(dchar[]);

T rdElem(T)()
if (is(T == struct))
{
    T result;
    string[] input = rdRow!string;
    assert(T.tupleof.length == input.length);
    foreach (i, ref x; result.tupleof)
    {
        x = input[i].to!(typeof(x));
    }
    return result;
}

T[] rdRow(T = long)()
{
    return readln.split.to!(T[]);
}

T[] rdCol(T = long)(long col)
{
    return iota(col).map!(x => rdElem!T).array;
}

T[][] rdMat(T = long)(long col)
{
    return iota(col).map!(x => rdRow!T).array;
}

void rdVals(T...)(ref T data)
{
    string[] input = rdRow!string;
    assert(data.length == input.length);
    foreach (i, ref x; data)
    {
        x = input[i].to!(typeof(x));
    }
}

void wrMat(T = long)(T[][] mat)
{
    foreach (row; mat)
    {
        foreach (j, compo; row)
        {
            compo.write;
            if (j == row.length - 1) writeln;
            else " ".write;
        }
    }
}

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.mathspecial;
import std.traits;
import std.container;
import std.functional;
import std.typecons;
import std.ascii;
import std.uni;
import core.bitop;

Measured memory_bytes: 256