def sgets = gets.strip x = sgets y = sgets d = [x, y].map(&:length).inject(:-) if d < 0 || d > 1 puts '?' else puts x.chars.zip(y.chars).join end