d={} while 1:s=input();t=max(s);d['?'in s!=print(s.replace('?',d[t]))or t]=min(s)