main=f[] f e=do s<-getLine;last$f(s:e):[putStrLn[head$[minimum q|c=='?',q<-e,maximum s`elem`q]++[c]|c<-s]|'?'<-s];f e