d={} while 1:s=input();t=max(s);d['?'in s!=print(s.replace('?',d[t]))or t]=min(s)
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page